[ Reference Manual | Alphabetic Index ]

library(threads)

Prolog thread API (ISO/IEC Draft TR 13211-5:2007)   [more]

Predicates

is_thread(?Term)
Succeeds if Term is a DTR-thread alias or thread/engine handle
message_queue_create(-Queue)
Creates a DTR message queue
message_queue_create(-Queue, ++Options)
Creates a DTR message queue
message_queue_destroy(+Queue)
Destroy a DTR message queue
mutex_create(?Mutex)
Creates a mutual exclusion object with alias
mutex_create(-Mutex, ++Options)
Creates a mutual exclusion object
mutex_destroy(+Mutex)
Destroys a mutual exclusion object
thread_cancel(+Thread)
Makes Thread exit at the next opportunity
thread_create(+Goal)
Create a detached DTR-thread with default options
thread_create(+Goal, -Thread)
Create a DTR-thread with default options
thread_create(+Goal, -Thread, +Options)
Create a DTR-thread
thread_default(?Option)
Get default options for thread/engine creation
thread_detach(+Thread)
Thread
thread_exit(+Term)
Exit the executing DTR-thread with status exited(Term)
thread_get_message(?Message)
Wait for and remove a message from the calling DTR-thread's message queue
thread_get_message(+Queue, ?Message)
Wait for and remove a message from Queue
thread_join(+Thread, -Status)
Wait for termination of Thread
thread_peek_message(-Message)
Check for Message in the calling DTR-thread's message queue
thread_peek_message(+Queue, -Message)
Check for Message in Queue
thread_property(?Thread, ?Property)
Enumerates threads and their properties
thread_self(?Thread)
True if Thread is the calling DTR-thread
thread_send_message(?Message)
Sends a message via the calling DTR-thread's message queue
thread_send_message(+Queue, ?Message)
Sends a message via Queue
thread_set_default(++Option)
Set default options for thread/engine creation
thread_signal(+Thread, +Goal)
Makes Thread execute Goal at the next opportunity
thread_sleep(+Seconds)
Suspends the calling thread/engine for Seconds seconds
with_mutex(+Mutex, +Goal)
Equivalent to once(Goal) but with mutual exclusion

Other Exports

Description

This library implements most of the functionality described in the Draft Technical Recommendation ISO/IEC DTR 13211-5:2007 'Prolog Multi-threading Support' (http://logtalk.org/plstd/threads.pdf), which is also the basis for multi-threading functionality in a number of Prolog systems (SWI, XSB, YAP). To clarify notation, we will refer to

Note that this library is just a thin layer on top of ECLiPSe's more general 'engine' functionality. The main differences are:

About


Generated from threads.eci on 2022-09-03 14:26