PCALL (FUNCTION &KEY (INITIAL-BINDINGS *DEFAULT-SPECIAL-BINDINGS*) (NAME Anonymous task))
PCALL -> Parallel Call; calls FUNCTION in a new thread. FUNCTION must be a no-argument function. INITIAL-BINDINGS, if provided, should be an alist representing dynamic variable bindings that BODY is to be executed with. The format is: '((*var* value)).
Sets QUEUE's tail to QUEUE, increments QUEUE's tail pointer, and returns the previous tail ref
Enqueue OBJECT and increment QUEUE's entry pointer
Creates a new queue of maximum size LENGTH
Returns QUEUE's effective length
Checks whether QUEUE is effectively empty
Checks whether QUEUE is effectively full
QUEUE's entry pointer
Returns QUEUE's maximum length
QUEUE's exit pointer
Dereference QUEUE's exit pointer
Checks whether QUEUE's theoretical length is zero
ENQUEUE (OBJECT QUEUE)
Enqueues OBJECT in QUEUE
Makes a queue of maximum size SIZE
NUNZIP-ALIST (ALIST &AUX (KEYS ALIST) (VALS (CAR ALIST)))
Destructive, non-consing version of `unzip-alist'.
Returns the current size of QUEUE
Tests whether QUEUE is empty
Tests whether QUEUE is full
Returns the maximum size of QUEUE
If this returns NIL, X is not a queue
Returns two fresh lists containing the keys and values of ALIST
CAS-CHANNEL-SET (SLOT-NAME CHANNEL VALUE)
NEW-WORKER-THREAD (THREAD-POOL &OPTIONAL TASK)
PEXEC ((&KEY INITIAL-BINDINGS NAME) &BODY BODY)
Executes BODY in parallel. INITIAL-BINDINGS, if provided, should be an alist representing dynamic variable bindings that BODY is to be executed with. The format is: '((*var* value)).
SELECT (&BODY CLAUSES)
Non-deterministically select a non-blocking clause to execute. The syntax is: select clause* clause ::= (op form*) op ::= (recv c &optional variable channel-var) | (send c value &optional channel-var) | else | otherwise | t c ::= An evaluated form representing a channel, or a sequence of channels. variable ::= an unevaluated symbol RECV's return value is to be bound to. Made available to form*. value ::= An evaluated form representing a value to send into the channel. channel-var ::= An unevaluated symbol that will be bound to the channel the SEND/RECV operation succeeded on. SELECT will first attempt to find a clause with a non-blocking op, and execute it. Execution of the check-if-blocks-and-do-it part is atomic, but execution of the clause's body once the SEND/RECV clause executes is NOT atomic. If all channel clauses would block, and no else clause is provided, SELECT will block until one of the clauses is available for execution. SELECT's non-determinism is, in fact, very non-deterministic. Clauses are chosen at random, not in the order they are written. It's worth noting that SEND/RECV, when used on sequences of channels, are still linear in the way they go through the sequence -- the random selection is reserved for individual SELECT clauses.
ECOND (&BODY COND-CLAUSES &AUX ERROR)
Like `ecase', but for `cond'. An optional initial string is used as the error message.
FUN (&BODY BODY)
This macro puts the FUN back in FUNCTION.
Returns and removes all leading declarations from PLACE, which should be a setf-able form. NOTE: Does not support docstrings.
AIF (TEST THEN &OPTIONAL ELSE)
AWHEN (TEST &BODY BODY)
DEFINE-PRINT-OBJECT (((OBJECT CLASS) &KEY (IDENTITY T) (TYPE T)) &BODY BODY)
DEFINE-SPEEDY-FUNCTION (NAME ARGS &BODY BODY)
PUSHEND (NEW-ITEM LIST LIST-END &ENVIRONMENT ENV)
WHEN-BIND (VARIABLE TEST &BODY BODY)
WITH-CAS-READ-STATE (CHANNEL &BODY BODY)
WITH-CAS-WRITE-STATE (CHANNEL &BODY BODY)
WITH-GENSYMS (NAMES &BODY BODY)
WITH-READ-STATE (CHANNEL &BODY BODY)
WITH-WRITE-STATE (CHANNEL &BODY BODY)
RECV (CHAN &KEY (BLOCKP T))
Tries to receive from either a single channel, or a sequence of channels. If BLOCKP is true, RECV will block until it's possible to receive something. Returns two values: The first is the actual value received through the channel. The second is the channel the value was received from. When BLOCKP is NIL, RECV will immediately return (values NIL NIL) instead of blocking (if it would block)
SEND (CHAN VALUE &KEY (BLOCKP T))
Tries to send VALUE into CHAN. If a sequence of channels is provided instead of a single channel, SEND will send the value into the first channel that doesn't block. If BLOCKP is true, SEND will continue to block until it's able to actually send a value. If BLOCKP is NIL, SEND will immediately return NIL instead of blocking, if there's no channel available to send input into. When SEND succeeds, it returns the channel the value was sent into.
Returns T if trying to SEND to CHANNEL would block. Note that this is not an atomic operation, and should not be relied on in production. It's mostly meant for interactive/debugging purposes.
CHANNEL-INSERT-VALUE (CHANNEL VALUE)
Dequeue a value from CHANNEL's buffer queue.
CHANNEL-ENQUEUE (VALUE CHANNEL)
Enqueue VALUE in CHANNEL's buffer queue.
Peek at the next value CHANNEL would dequeue. Note that this cannot be used atomically. Returns two values: The first is the value of interest or NIL, the second is a generalized boolean that is NIL when there is no available value in the queue.
ASSIGN-TASK (THREAD-POOL TASK)
CHANNEL-PUSH (VALUE CHANNEL)
SETFTASK-NAME (NEW-VALUE OBJECT)
SETFTASK-STATUS (NEW-VALUE OBJECT)
SETFTASK-THREAD (NEW-VALUE OBJECT)
SETFCHANNEL-LOCK (NEW-VALUE OBJECT)
SETFCHANNEL-READERS (NEW-VALUE OBJECT)
SETFCHANNEL-RECV-OK (NEW-VALUE OBJECT)
SETFCHANNEL-SEND-OK (NEW-VALUE OBJECT)
SETFCHANNEL-SEND-RETURN-WAIT (NEW-VALUE OBJECT)
SETFCHANNEL-VALUE (NEW-VALUE OBJECT)
SETFCHANNEL-VECTOR (NEW-VALUE OBJECT)
SETFCHANNEL-WRITERS (NEW-VALUE OBJECT)
SETFFREE-THREAD-COUNTER (NEW-VALUE OBJECT)
SETFPOOL-PENDING-TASKS (NEW-VALUE OBJECT)
SETFPOOL-SOFT-LIMIT (NEW-VALUE OBJECT)
SETFPOOL-TASKS (NEW-VALUE OBJECT)
SETFPOOL-THREADS (NEW-VALUE OBJECT)
SETFRECV-GRABBED-VALUE-P (NEW-VALUE OBJECT)
This variable holds an alist associating special variable symbols to forms to evaluate. Special variables named in this list will be locally bound in the new thread before it begins executing user code. This variable may be rebound around calls to MAKE-THREAD to add/alter default bindings. The effect of mutating this list is undefined, but earlier forms take precedence over later forms for the same symbol, so defaults may be overridden by consing to the head of the list.
This value is used as a sentinel in channels.
Abstract class for channels using various buffering styles.
These channels use COMPARE-AND-SWAP to do their thing, instead of locks+condition-vars. Ideally, these would be faster than regular channels. In reality, they're not. It's possible there might be a way to speed these guys up while keeping the same behavior in the interface, but for now, they're about 100x slower, not to mention non-portable.
These channels buffer objects in some sort of queue.
The exclusive upper bound on the size of a channel's buffer.