YAP 7.1.0
Threads

YAP implements a SWI-Prolog compatible multithreading library. More...

Detailed Description

YAP implements a SWI-Prolog compatible multithreading library.

Like in SWI-Prolog, Prolog threads have their own stacks and only share the Prolog heap: predicates, records, flags and other global non-backtrackable data The package is based on the POSIX thread standard (Butenhof:1997:PPT) used on most popular systems except for MS-Windows

Modules

 Creating and Destroying Prolog Threads
 
 Monitoring Threads
 Normal multi-threaded applications should not need these the predicates from this section because almost any usage of these predicates is unsafe.
 
 Signalling Threads
 These predicates provide a mechanism to make another thread execute some goal as an interrupt
 
 Thread Synchronisation
 All internal Prolog operations are thread-safe.
 
 Thread communication
 Prolog threads can exchange data using dynamic predicates, database records, and other globally shared data.
 
 Threads and Dynamic Predicates
 Besides queues threads can share and exchange data using dynamic predicates.
 

Function Documentation

◆ Yap_InitFirstWorkerThreadHandle()

void Yap_InitFirstWorkerThreadHandle ( void  )

Definition at line 1826 of file threads.c.

◆ Yap_InitThreadPreds()

void Yap_InitThreadPreds ( void  )

Definition at line 1830 of file threads.c.

◆ Yap_NOfThreads()

int Yap_NOfThreads ( void  )

Definition at line 1684 of file threads.c.

Variable Documentation

◆ PL_Message_Queue

blob_type_t PL_Message_Queue
Initial value:
= {
YAP_BLOB_MAGIC_B,
PL_BLOB_UNIQUE | PL_BLOB_NOCOPY,
"message_queue",
0,
0,
0,
0
}

Definition at line 47 of file threads.c.