Common Lisp Package: THREAD.COMM.RENDEZVOUS

README:

FUNCTION

Public

Undocumented

MAKE-RENDEZVOUS (&OPTIONAL (NAME Anonymous))

Private

CONDITION-NOTIFY (CONDITION-VARIABLE)

Notify at least one of the threads waiting for CONDITION-VARIABLE. It is implementation-dependent whether one or more than one (and possibly all) threads are woken, but if the implementation is capable of waking only a single thread (not all are) this is probably preferable for efficiency reasons. The order of wakeup is unspecified and does not necessarily relate to the order that the threads went to sleep in. CONDITION-NOTIFY has no useful return value. In an implementation that does not support multiple threads, it has no effect.

CONDITION-WAIT (CONDITION-VARIABLE LOCK)

Atomically release LOCK and enqueue the calling thread waiting for CONDITION-VARIABLE. The thread will resume when another thread has notified it using CONDITION-NOTIFY; it may also resume if interrupted by some external event or in other implementation-dependent circumstances: the caller must always test on waking that there is threading to be done, instead of assuming that it can go ahead. However and for whatever reason the thread is resumed, the system always reacquires LOCK before returning to the caller. It is an error to call this unless from the thread that holds LOCK. In an implementation that does not support multiple threads, this function signals an error.

MAKE-CONDITION-VARIABLE (&KEY NAME)

Returns a new condition-variable object for use with CONDITION-WAIT and CONDITION-NOTIFY.

MAKE-LOCK (&OPTIONAL NAME)

Creates a lock (a mutex) whose name is NAME. If the system does not support multiple threads this will still return some object, but it may not be used for very much.

MAKE-SEMAPHORE (&KEY NAME (COUNT 0))

Create a semaphore with the supplied COUNT and NAME.

NICKNAME-PACKAGE (&OPTIONAL (NICKNAME RDV))

Add NICKNAME (:RDV by default) to the :THREAD.COMM.RENDEZVOUS package.

SIGNAL-SEMAPHORE (SEMAPHORE &OPTIONAL (N 1))

Increment the count of SEMAPHORE by N. If there are threads waiting on this semaphore, then N of them is woken up.

WAIT-ON-SEMAPHORE (SEMAPHORE &KEY TIMEOUT NOTIFICATION)

Decrement the count of SEMAPHORE if the count would not be negative. Else blocks until the semaphore can be decremented. Returns T on success. If TIMEOUT is given, it is the maximum number of seconds to wait. If the count cannot be decremented in that time, returns NIL without decrementing the count. If NOTIFICATION is given, it must be a SEMAPHORE-NOTIFICATION object whose SEMAPHORE-NOTIFICATION-STATUS is NIL. If WAIT-ON-SEMAPHORE succeeds and decrements the count, the status is set to T.

Undocumented

MAKE-TCONC

POP-TCONC (TCONC)

PUSH-TCONC (TCONC ITEM)

TCONC-EMPTY-P (TCONC)

TCONC-LIST (TCONC)

MACRO

Private

WITH-LOCK-HELD ((PLACE) &BODY BODY)

Evaluates BODY with the lock named by PLACE, the value of which is a lock created by MAKE-LOCK. Before the forms in BODY are evaluated, the lock is acquired as if by using ACQUIRE-LOCK. After the forms in BODY have been evaluated, or if a non-local control transfer is caused (e.g. by THROW or SIGNAL), the lock is released as if by RELEASE-LOCK. Note that if the debugger is entered, it is unspecified whether the lock is released at debugger entry or at debugger exit when execution is restarted.

GENERIC-FUNCTION

Public

Undocumented

ACCEPT-RENDEZVOUS (RENDEZVOUS &KEY REPLY)

CALL-RENDEZVOUS (RENDEZVOUS VALUE)

RENDEZVOUS-NAME (RENDEZVOUS)

CLASS

Private

Undocumented

RENDEZVOUS