The chanl Reference Manual

This is the chanl Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:34:44 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 chanl

Communicating Sequential Process support for Common Lisp

Author

Kat Marchan

Dependency

bordeaux-threads (system).

Source

chanl.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 chanl/src

Source

chanl.asd.

Parent Component

chanl (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 chanl/chanl.asd

Source

chanl.asd.

Parent Component

chanl (system).

ASDF Systems

chanl.


4.1.2 chanl/src/trivial-cas.lisp

Source

chanl.asd.

Parent Component

src (module).

Packages

trivial-compare-and-swap.

Public Interface

atomic-incf (macro).


4.1.3 chanl/src/package.lisp

Dependency

trivial-cas.lisp (file).

Source

chanl.asd.

Parent Component

src (module).

Packages

chanl.


4.1.4 chanl/src/utils.lisp

Dependency

package.lisp (file).

Source

chanl.asd.

Parent Component

src (module).

Internals

4.1.5 chanl/src/threads.lisp

Dependency

utils.lisp (file).

Source

chanl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 chanl/src/queues.lisp

Dependency

threads.lisp (file).

Source

chanl.asd.

Parent Component

src (module).

Internals

4.1.7 chanl/src/channels.lisp

Dependency

queues.lisp (file).

Source

chanl.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.8 chanl/src/select.lisp

Dependency

channels.lisp (file).

Source

chanl.asd.

Parent Component

src (module).

Public Interface

select (macro).

Internals

5 Packages

Packages are listed by definition order.


5.1 trivial-compare-and-swap

Source

trivial-cas.lisp.

Nickname

trivial-cas

Use List

common-lisp.

Used By List

chanl.

Public Interface

atomic-incf (macro).


5.2 chanl

Source

package.lisp.

Use List
Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Constants

Constant: +maximum-buffer-size+

The exclusive upper bound on the size of a channel’s buffer.

Package

chanl.

Source

channels.lisp.


6.1.2 Symbol macros

Symbol Macro: %thread-pool-soft-limit
Package

chanl.

Source

threads.lisp.


6.1.3 Macros

Macro: atomic-incf (place &optional delta)
Package

trivial-compare-and-swap.

Source

trivial-cas.lisp.

Macro: 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)).

Package

chanl.

Source

threads.lisp.

Macro: select (&body clauses)

Non-deterministically select a non-blocking clause to execute.

The syntax is:

select clause* -> result(s)
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, bound within form* to RECV’s return value. value ::= an evaluated form returning 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.
result(s) ::= the values returned by the last form in the selected clause.

SELECT will first attempt to find a clause with a non-blocking op, and execute it. Selecting a clause to execute is atomic, but execution of the clause’s body after the SEND/RECV clause executes is NOT atomic. If all channel clauses would block, and no else clause is provided, SELECT will thrash-idle (an undesirable state!) 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.

Package

chanl.

Source

select.lisp.


6.1.4 Ordinary functions

Function: all-threads ()
Package

chanl.

Source

threads.lisp.

Function: current-thread ()
Package

chanl.

Source

threads.lisp.

Function: kill (proc)
Package

chanl.

Source

threads.lisp.

Function: pcall (function &key initial-bindings name)

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)).

Package

chanl.

Source

threads.lisp.

Function: pool-health ()
Package

chanl.

Source

threads.lisp.

Function: pooled-tasks ()
Package

chanl.

Source

threads.lisp.

Function: pooled-threads ()
Package

chanl.

Source

threads.lisp.

Function: thread-alive-p (proc)
Package

chanl.

Source

threads.lisp.

Function: thread-name (proc)
Package

chanl.

Source

threads.lisp.

Function: threadp (proc)
Package

chanl.

Source

threads.lisp.


6.1.5 Generic functions

Generic Function: channel-grab-value (channel)
Package

chanl.

Source

channels.lisp.

Methods
Method: channel-grab-value ((channel cas-channel))
Method: channel-grab-value ((channel queue-channel))
Method: channel-grab-value ((channel stack-channel))
Method: channel-grab-value ((channel channel))
Generic Function: channel-insert-value (channel value)
Package

chanl.

Source

channels.lisp.

Methods
Method: channel-insert-value ((channel cas-channel) value)
Method: channel-insert-value ((channel queue-channel) value)
Method: channel-insert-value ((channel stack-channel) value)
Method: channel-insert-value ((channel channel) value)
Generic Function: channelp (channel)
Package

chanl.

Source

channels.lisp.

Methods
Method: channelp (anything-else)
Method: channelp ((channel abstract-channel))
Generic Function: recv (chan &key blockp)

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)

Package

chanl.

Source

channels.lisp.

Methods
Method: recv ((channel cas-channel) &key blockp)
Method: recv ((channel channel) &key blockp)
Method: recv ((channels null) &key)
Method: recv ((channels sequence) &key blockp)
Generic Function: recv-blocks-p (channel)

Returns T if trying to RECV from CHANNEL would block.

Assumes that the calling context holds the channel’s lock.

Package

chanl.

Source

channels.lisp.

Methods
Method: recv-blocks-p ((channel cas-channel))
Method: recv-blocks-p ((channel unbounded-channel))
Method: recv-blocks-p ((channel bounded-channel))
Method: recv-blocks-p ((channel stack-channel))
Method: recv-blocks-p ((channel channel))
Generic Function: send (chan value &key blockp)

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.

Package

chanl.

Source

channels.lisp.

Methods
Method: send ((channel cas-channel) value &key blockp)
Method: send ((channel channel) value &key blockp)
Method: send ((channels null) value &key)
Method: send ((channels sequence) value &key blockp)
Generic Function: send-blocks-p (channel)

Returns T if trying to SEND to CHANNEL would block.

Assumes that the calling context holds the channel’s lock.

Package

chanl.

Source

channels.lisp.

Methods
Method: send-blocks-p ((channel cas-channel))
Method: send-blocks-p ((channel unbounded-channel))
Method: send-blocks-p ((channel bounded-channel))
Method: send-blocks-p ((channel stack-channel))
Method: send-blocks-p ((channel channel))
Generic Reader: task-name (object)
Package

chanl.

Methods
Reader Method: task-name ((task task))

automatically generated reader method

Source

threads.lisp.

Target Slot

name.

Generic Writer: (setf task-name) (object)
Package

chanl.

Methods
Writer Method: (setf task-name) ((task task))

automatically generated writer method

Source

threads.lisp.

Target Slot

name.

Generic Reader: task-status (object)
Package

chanl.

Methods
Reader Method: task-status ((task task))

automatically generated reader method

Source

threads.lisp.

Target Slot

status.

Generic Writer: (setf task-status) (object)
Package

chanl.

Methods
Writer Method: (setf task-status) ((task task))

automatically generated writer method

Source

threads.lisp.

Target Slot

status.

Generic Reader: task-thread (object)
Package

chanl.

Methods
Reader Method: task-thread ((task task))

automatically generated reader method

Source

threads.lisp.

Target Slot

thread.

Generic Writer: (setf task-thread) (object)
Package

chanl.

Methods
Writer Method: (setf task-thread) ((task task))

automatically generated writer method

Source

threads.lisp.

Target Slot

thread.


6.1.6 Standalone methods

Method: initialize-instance :after ((channel stack-channel) &key)
Source

channels.lisp.

Method: initialize-instance :after ((channel unbounded-channel) &key)
Source

channels.lisp.

Method: initialize-instance :after ((channel bounded-channel) &key size)
Source

channels.lisp.

Method: print-object ((channel stack-channel) stream0)
Source

channels.lisp.

Method: print-object ((channel unbounded-channel) stream0)
Source

channels.lisp.

Method: print-object ((channel bounded-channel) stream0)
Source

channels.lisp.

Method: print-object ((task task) stream0)
Source

threads.lisp.


6.1.7 Classes

Class: abstract-channel
Package

chanl.

Source

channels.lisp.

Direct subclasses
Direct methods

channelp.

Class: bounded-channel
Package

chanl.

Source

channels.lisp.

Direct superclasses

queue-channel.

Direct methods
Class: buffered-channel

Abstract class for channels using various buffering styles.

Package

chanl.

Source

channels.lisp.

Direct superclasses

channel.

Direct subclasses
Direct methods

channel-buffered-p.

Class: cas-channel

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.

Package

chanl.

Source

channels.lisp.

Direct superclasses

abstract-channel.

Direct methods
Direct slots
Slot: vector
Package

common-lisp.

Initform

(vector chanl::*secret-unbound-value* 0 0 nil)

Readers

channel-vector.

Writers

(setf channel-vector).

Class: channel
Package

chanl.

Source

channels.lisp.

Direct superclasses

abstract-channel.

Direct subclasses

buffered-channel.

Direct methods
Direct slots
Slot: value
Initform

chanl::*secret-unbound-value*

Readers

channel-value.

Writers

(setf channel-value).

Slot: readers
Initform

0

Readers

channel-readers.

Writers

(setf channel-readers).

Slot: writers
Initform

0

Readers

channel-writers.

Writers

(setf channel-writers).

Slot: lock
Initform

(bordeaux-threads:make-recursive-lock)

Slot: send-ok
Initform

(bordeaux-threads:make-condition-variable)

Slot: recv-ok
Initform

(bordeaux-threads:make-condition-variable)

Slot: send-return-wait
Initform

(bordeaux-threads:make-condition-variable)

Readers

channel-send-return-wait.

Writers

(setf channel-send-return-wait).

Slot: recv-grabbed-value-p
Readers

recv-grabbed-value-p.

Writers

(setf recv-grabbed-value-p).

Class: queue-channel

These channels buffer objects in some sort of queue.

Package

chanl.

Source

channels.lisp.

Direct superclasses

buffered-channel.

Direct subclasses
Direct methods
Class: stack-channel
Package

chanl.

Source

channels.lisp.

Direct superclasses

buffered-channel.

Direct methods
Class: task
Package

chanl.

Source

threads.lisp.

Direct methods
Direct slots
Slot: name
Initform

"anonymous task"

Initargs

:name

Readers

task-name.

Writers

(setf task-name).

Slot: function
Package

common-lisp.

Initform

(error "must supply a task-function")

Initargs

:function

Readers

task-function.

Writers

This slot is read-only.

Slot: status
Initform

:pending

Readers

task-status.

Writers

(setf task-status).

Slot: thread
Readers

task-thread.

Writers

(setf task-thread).

Class: unbounded-channel
Package

chanl.

Source

channels.lisp.

Direct superclasses

queue-channel.

Direct methods

6.2 Internals


6.2.1 Special variables

Special Variable: *secret-unbound-value*

This value is used as a sentinel in channels.

Package

chanl.

Source

channels.lisp.

Special Variable: *thread-pool*
Package

chanl.

Source

threads.lisp.

Special Variable: queue-sentinel
Package

chanl.

Source

queues.lisp.


6.2.2 Macros

Macro: aif (test then &optional else)
Package

chanl.

Source

utils.lisp.

Macro: awhen (test &body body)
Package

chanl.

Source

utils.lisp.

Macro: define-print-object (((object class) &key identity type) &body body)
Package

chanl.

Source

utils.lisp.

Macro: define-speedy-function (name args &body body)
Package

chanl.

Source

utils.lisp.

Macro: econd (&body cond-clauses)

Like ‘ecase’, but for ‘cond’. An optional initial string is used as the error message.

Package

chanl.

Source

utils.lisp.

Macro: fun (&body body)

This macro puts the FUN back in FUNCTION.

Package

chanl.

Source

utils.lisp.

Macro: pop-declarations (place)

Returns and removes all leading declarations from PLACE, which should be a setf-able form. NOTE: Does not support docstrings.

Package

chanl.

Source

utils.lisp.

Macro: pushend (new-item list list-end)
Package

chanl.

Source

utils.lisp.

Macro: when-bind (variable test &body body)
Package

chanl.

Source

utils.lisp.

Macro: with-cas-read-state (channel &body body)
Package

chanl.

Source

channels.lisp.

Macro: with-cas-write-state (channel &body body)
Package

chanl.

Source

channels.lisp.

Macro: with-channel-slots ((lock recv-ok send-ok) channel &body body)
Package

chanl.

Source

channels.lisp.

Macro: with-gensyms (names &body body)
Package

chanl.

Source

utils.lisp.

Macro: with-read-state (channel &body body)
Package

chanl.

Source

channels.lisp.

Macro: with-write-state (channel &body body)
Package

chanl.

Source

channels.lisp.


6.2.3 Ordinary functions

Function: %dequeue (queue)

Sets QUEUE’s tail to QUEUE, increments QUEUE’s tail pointer, and returns the previous tail ref

Package

chanl.

Source

queues.lisp.

Function: %enqueue (object queue)

Enqueue OBJECT and increment QUEUE’s entry pointer

Package

chanl.

Source

queues.lisp.

Function: %make-queue (length)

Creates a new queue of maximum size LENGTH

Package

chanl.

Source

queues.lisp.

Function: %next-index (current-index queue-real-length)
Package

chanl.

Source

queues.lisp.

Function: %queue-count (queue)

Returns QUEUE’s effective length

Package

chanl.

Source

queues.lisp.

Function: %queue-empty-p (queue)

Checks whether QUEUE is effectively empty

Package

chanl.

Source

queues.lisp.

Function: %queue-full-p (queue)

Checks whether QUEUE is effectively full

Package

chanl.

Source

queues.lisp.

Function: %queue-in (queue)

QUEUE’s entry pointer

Package

chanl.

Source

queues.lisp.

Function: %queue-length (queue)

Returns QUEUE’s maximum length

Package

chanl.

Source

queues.lisp.

Function: %queue-out (queue)

QUEUE’s exit pointer

Package

chanl.

Source

queues.lisp.

Function: %queue-peek (queue)

Dereference QUEUE’s exit pointer

Package

chanl.

Source

queues.lisp.

Function: %queue-zero-p (queue)

Checks whether QUEUE’s theoretical length is zero

Package

chanl.

Source

queues.lisp.

Function: cas-channel-set (slot-name channel value)
Package

chanl.

Source

channels.lisp.

Function: channel-being-read-p (channel)
Package

chanl.

Source

channels.lisp.

Function: channel-being-written-p (channel)
Package

chanl.

Source

channels.lisp.

Function: clause-type (clause)
Package

chanl.

Source

select.lisp.

Function: dequeue (queue)

Dequeues QUEUE

Package

chanl.

Source

queues.lisp.

Function: enqueue (object queue)

Enqueues OBJECT in QUEUE

Package

chanl.

Source

queues.lisp.

Function: ensure-list (x)
Package

chanl.

Source

utils.lisp.

Function: make-queue (size)

Makes a queue of maximum size SIZE

Package

chanl.

Source

queues.lisp.

Function: new-worker-thread (thread-pool &optional task)
Package

chanl.

Source

threads.lisp.

Function: nunzip-alist (alist)

Destructive, non-consing version of ‘unzip-alist’.

Package

chanl.

Source

utils.lisp.

Function: queue-count (queue)

Returns the current size of QUEUE

Package

chanl.

Source

queues.lisp.

Function: queue-empty-p (queue)

Tests whether QUEUE is empty

Package

chanl.

Source

queues.lisp.

Function: queue-full-p (queue)

Tests whether QUEUE is full

Package

chanl.

Source

queues.lisp.

Function: queue-length (queue)

Returns the maximum size of QUEUE

Package

chanl.

Source

queues.lisp.

Function: queue-peek (queue)
Package

chanl.

Source

queues.lisp.

Function: queuep (x)

If this returns NIL, X is not a queue

Package

chanl.

Source

queues.lisp.

Function: unzip-alist (alist)

Returns two fresh lists containing the keys and values of ALIST

Package

chanl.

Source

utils.lisp.

Function: wrap-select-clause (clause)
Package

chanl.

Source

select.lisp.


6.2.4 Generic functions

Generic Function: assign-task (thread-pool task)
Package

chanl.

Source

threads.lisp.

Methods
Method: assign-task ((thread-pool thread-pool) (task task))
Generic Function: channel-buffered-p (channel)
Package

chanl.

Source

channels.lisp.

Methods
Method: channel-buffered-p (anything-else)
Method: channel-buffered-p ((channel buffered-channel))
Generic Function: channel-dequeue (channel)

Dequeue a value from CHANNEL’s buffer queue.

Package

chanl.

Source

channels.lisp.

Methods
Method: channel-dequeue ((channel unbounded-channel))
Method: channel-dequeue ((channel bounded-channel))
Generic Function: channel-enqueue (value channel)

Enqueue VALUE in CHANNEL’s buffer queue.

Package

chanl.

Source

channels.lisp.

Methods
Method: channel-enqueue (value (channel unbounded-channel))
Method: channel-enqueue (value (channel bounded-channel))
Generic Function: channel-peek (channel)

Peek at a possible next value CHANNEL would dequeue. An actual call to RECV may return a different value, if the previously-peeked one has been received by a different thread in the meantime.

Returns two values: the value of interest or NIL, and a generalized boolean that is NIL when there is no available value in the queue.

Package

chanl.

Source

channels.lisp.

Methods
Method: channel-peek ((channel unbounded-channel))
Method: channel-peek ((channel bounded-channel))
Method: channel-peek ((channel stack-channel))
Generic Function: channel-pop (channel)
Package

chanl.

Source

channels.lisp.

Methods
Method: channel-pop ((channel stack-channel))
Generic Function: channel-push (value channel)
Package

chanl.

Source

channels.lisp.

Methods
Method: channel-push (value (channel stack-channel))
Generic Function: channel-readers (object)
Package

chanl.

Methods
Method: channel-readers ((channel cas-channel))
Source

channels.lisp.

Reader Method: channel-readers ((channel channel))

automatically generated reader method

Source

channels.lisp.

Target Slot

readers.

Generic Writer: (setf channel-readers) (object)
Package

chanl.

Methods
Writer Method: (setf channel-readers) ((channel channel))

automatically generated writer method

Source

channels.lisp.

Target Slot

readers.

Generic Reader: channel-send-return-wait (object)
Package

chanl.

Methods
Reader Method: channel-send-return-wait ((channel channel))

automatically generated reader method

Source

channels.lisp.

Target Slot

send-return-wait.

Generic Writer: (setf channel-send-return-wait) (object)
Package

chanl.

Methods
Writer Method: (setf channel-send-return-wait) ((channel channel))

automatically generated writer method

Source

channels.lisp.

Target Slot

send-return-wait.

Generic Function: channel-value (object)
Package

chanl.

Methods
Method: channel-value ((channel cas-channel))
Source

channels.lisp.

Reader Method: channel-value ((channel channel))

automatically generated reader method

Source

channels.lisp.

Target Slot

value.

Generic Writer: (setf channel-value) (object)
Package

chanl.

Methods
Writer Method: (setf channel-value) ((channel channel))

automatically generated writer method

Source

channels.lisp.

Target Slot

value.

Generic Reader: channel-vector (object)
Package

chanl.

Methods
Reader Method: channel-vector ((cas-channel cas-channel))

automatically generated reader method

Source

channels.lisp.

Target Slot

vector.

Generic Writer: (setf channel-vector) (object)
Package

chanl.

Methods
Writer Method: (setf channel-vector) ((cas-channel cas-channel))

automatically generated writer method

Source

channels.lisp.

Target Slot

vector.

Generic Function: channel-writers (object)
Package

chanl.

Methods
Method: channel-writers ((channel cas-channel))
Source

channels.lisp.

Reader Method: channel-writers ((channel channel))

automatically generated reader method

Source

channels.lisp.

Target Slot

writers.

Generic Writer: (setf channel-writers) (object)
Package

chanl.

Methods
Writer Method: (setf channel-writers) ((channel channel))

automatically generated writer method

Source

channels.lisp.

Target Slot

writers.

Generic Reader: free-thread-counter (object)
Package

chanl.

Methods
Reader Method: free-thread-counter ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

free-thread-counter.

Generic Writer: (setf free-thread-counter) (object)
Package

chanl.

Methods
Writer Method: (setf free-thread-counter) ((thread-pool thread-pool))

automatically generated writer method

Source

threads.lisp.

Target Slot

free-thread-counter.

Generic Reader: pool-leader-lock (object)
Package

chanl.

Methods
Reader Method: pool-leader-lock ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

leader-lock.

Generic Reader: pool-leader-notifier (object)
Package

chanl.

Methods
Reader Method: pool-leader-notifier ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

leader-notifier.

Generic Reader: pool-lock (object)
Package

chanl.

Methods
Reader Method: pool-lock ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

lock.

Generic Reader: pool-pending-tasks (object)
Package

chanl.

Methods
Reader Method: pool-pending-tasks ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

pending-tasks.

Generic Writer: (setf pool-pending-tasks) (object)
Package

chanl.

Methods
Writer Method: (setf pool-pending-tasks) ((thread-pool thread-pool))

automatically generated writer method

Source

threads.lisp.

Target Slot

pending-tasks.

Generic Reader: pool-soft-limit (object)
Package

chanl.

Methods
Reader Method: pool-soft-limit ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

soft-limit.

Generic Writer: (setf pool-soft-limit) (object)
Package

chanl.

Methods
Writer Method: (setf pool-soft-limit) ((thread-pool thread-pool))

automatically generated writer method

Source

threads.lisp.

Target Slot

soft-limit.

Generic Reader: pool-tasks (object)
Package

chanl.

Methods
Reader Method: pool-tasks ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

tasks.

Generic Writer: (setf pool-tasks) (object)
Package

chanl.

Methods
Writer Method: (setf pool-tasks) ((thread-pool thread-pool))

automatically generated writer method

Source

threads.lisp.

Target Slot

tasks.

Generic Reader: pool-threads (object)
Package

chanl.

Methods
Reader Method: pool-threads ((thread-pool thread-pool))

automatically generated reader method

Source

threads.lisp.

Target Slot

threads.

Generic Writer: (setf pool-threads) (object)
Package

chanl.

Methods
Writer Method: (setf pool-threads) ((thread-pool thread-pool))

automatically generated writer method

Source

threads.lisp.

Target Slot

threads.

Generic Reader: queue-condition-queue (condition)
Package

chanl.

Methods
Reader Method: queue-condition-queue ((condition queue-condition))
Source

queues.lisp.

Target Slot

queue.

Generic Reader: queue-error-attempted-length (condition)
Package

chanl.

Methods
Reader Method: queue-error-attempted-length ((condition queue-length-error))
Source

queues.lisp.

Target Slot

attempted-length.

Generic Reader: queue-overflow-extra-item (condition)
Package

chanl.

Methods
Reader Method: queue-overflow-extra-item ((condition queue-overflow-error))
Source

queues.lisp.

Target Slot

item.

Generic Function: recv-grabbed-value-p (object)
Package

chanl.

Methods
Method: recv-grabbed-value-p ((channel cas-channel))
Source

channels.lisp.

Reader Method: recv-grabbed-value-p ((channel channel))

automatically generated reader method

Source

channels.lisp.

Target Slot

recv-grabbed-value-p.

Generic Writer: (setf recv-grabbed-value-p) (object)
Package

chanl.

Methods
Writer Method: (setf recv-grabbed-value-p) ((channel channel))

automatically generated writer method

Source

channels.lisp.

Target Slot

recv-grabbed-value-p.

Generic Reader: task-function (object)
Package

chanl.

Methods
Reader Method: task-function ((task task))

automatically generated reader method

Source

threads.lisp.

Target Slot

function.


6.2.5 Conditions

Condition: queue-condition
Package

chanl.

Source

queues.lisp.

Direct superclasses

error.

Direct subclasses
Direct methods

queue-condition-queue.

Direct slots
Slot: queue
Initargs

:queue

Readers

queue-condition-queue.

Writers

This slot is read-only.

Condition: queue-length-error
Package

chanl.

Source

queues.lisp.

Direct superclasses

queue-condition.

Direct methods

queue-error-attempted-length.

Direct slots
Slot: attempted-length
Initargs

:attempted-length

Readers

queue-error-attempted-length.

Writers

This slot is read-only.

Condition: queue-overflow-error
Package

chanl.

Source

queues.lisp.

Direct superclasses

queue-condition.

Direct methods

queue-overflow-extra-item.

Direct slots
Slot: item
Initargs

:item

Readers

queue-overflow-extra-item.

Writers

This slot is read-only.

Condition: queue-underflow-error
Package

chanl.

Source

queues.lisp.

Direct superclasses

queue-condition.


6.2.6 Classes

Class: thread-pool
Package

chanl.

Source

threads.lisp.

Direct methods
Direct slots
Slot: threads
Readers

pool-threads.

Writers

(setf pool-threads).

Slot: free-thread-counter
Initform

0

Readers

free-thread-counter.

Writers

(setf free-thread-counter).

Slot: soft-limit
Initform

1000

Readers

pool-soft-limit.

Writers

(setf pool-soft-limit).

Slot: lock
Initform

(bordeaux-threads:make-lock "thread pool lock")

Readers

pool-lock.

Writers

This slot is read-only.

Slot: leader-lock
Initform

(bordeaux-threads:make-lock "thread leader lock")

Readers

pool-leader-lock.

Writers

This slot is read-only.

Slot: leader-notifier
Initform

(bordeaux-threads:make-condition-variable)

Readers

pool-leader-notifier.

Writers

This slot is read-only.

Slot: pending-tasks
Readers

pool-pending-tasks.

Writers

(setf pool-pending-tasks).

Slot: tasks
Readers

pool-tasks.

Writers

(setf pool-tasks).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   I   K   M   N   P   Q   R   S   T   U   W  
Index Entry  Section

%
%dequeue: Private ordinary functions
%enqueue: Private ordinary functions
%make-queue: Private ordinary functions
%next-index: Private ordinary functions
%queue-count: Private ordinary functions
%queue-empty-p: Private ordinary functions
%queue-full-p: Private ordinary functions
%queue-in: Private ordinary functions
%queue-length: Private ordinary functions
%queue-out: Private ordinary functions
%queue-peek: Private ordinary functions
%queue-zero-p: Private ordinary functions

(
(setf channel-readers): Private generic functions
(setf channel-readers): Private generic functions
(setf channel-send-return-wait): Private generic functions
(setf channel-send-return-wait): Private generic functions
(setf channel-value): Private generic functions
(setf channel-value): Private generic functions
(setf channel-vector): Private generic functions
(setf channel-vector): Private generic functions
(setf channel-writers): Private generic functions
(setf channel-writers): Private generic functions
(setf free-thread-counter): Private generic functions
(setf free-thread-counter): Private generic functions
(setf pool-pending-tasks): Private generic functions
(setf pool-pending-tasks): Private generic functions
(setf pool-soft-limit): Private generic functions
(setf pool-soft-limit): Private generic functions
(setf pool-tasks): Private generic functions
(setf pool-tasks): Private generic functions
(setf pool-threads): Private generic functions
(setf pool-threads): Private generic functions
(setf recv-grabbed-value-p): Private generic functions
(setf recv-grabbed-value-p): Private generic functions
(setf task-name): Public generic functions
(setf task-name): Public generic functions
(setf task-status): Public generic functions
(setf task-status): Public generic functions
(setf task-thread): Public generic functions
(setf task-thread): Public generic functions

A
aif: Private macros
all-threads: Public ordinary functions
assign-task: Private generic functions
assign-task: Private generic functions
atomic-incf: Public macros
awhen: Private macros

C
cas-channel-set: Private ordinary functions
channel-being-read-p: Private ordinary functions
channel-being-written-p: Private ordinary functions
channel-buffered-p: Private generic functions
channel-buffered-p: Private generic functions
channel-buffered-p: Private generic functions
channel-dequeue: Private generic functions
channel-dequeue: Private generic functions
channel-dequeue: Private generic functions
channel-enqueue: Private generic functions
channel-enqueue: Private generic functions
channel-enqueue: Private generic functions
channel-grab-value: Public generic functions
channel-grab-value: Public generic functions
channel-grab-value: Public generic functions
channel-grab-value: Public generic functions
channel-grab-value: Public generic functions
channel-insert-value: Public generic functions
channel-insert-value: Public generic functions
channel-insert-value: Public generic functions
channel-insert-value: Public generic functions
channel-insert-value: Public generic functions
channel-peek: Private generic functions
channel-peek: Private generic functions
channel-peek: Private generic functions
channel-peek: Private generic functions
channel-pop: Private generic functions
channel-pop: Private generic functions
channel-push: Private generic functions
channel-push: Private generic functions
channel-readers: Private generic functions
channel-readers: Private generic functions
channel-readers: Private generic functions
channel-send-return-wait: Private generic functions
channel-send-return-wait: Private generic functions
channel-value: Private generic functions
channel-value: Private generic functions
channel-value: Private generic functions
channel-vector: Private generic functions
channel-vector: Private generic functions
channel-writers: Private generic functions
channel-writers: Private generic functions
channel-writers: Private generic functions
channelp: Public generic functions
channelp: Public generic functions
channelp: Public generic functions
clause-type: Private ordinary functions
current-thread: Public ordinary functions

D
define-print-object: Private macros
define-speedy-function: Private macros
dequeue: Private ordinary functions

E
econd: Private macros
enqueue: Private ordinary functions
ensure-list: Private ordinary functions

F
free-thread-counter: Private generic functions
free-thread-counter: Private generic functions
fun: Private macros
Function, %dequeue: Private ordinary functions
Function, %enqueue: Private ordinary functions
Function, %make-queue: Private ordinary functions
Function, %next-index: Private ordinary functions
Function, %queue-count: Private ordinary functions
Function, %queue-empty-p: Private ordinary functions
Function, %queue-full-p: Private ordinary functions
Function, %queue-in: Private ordinary functions
Function, %queue-length: Private ordinary functions
Function, %queue-out: Private ordinary functions
Function, %queue-peek: Private ordinary functions
Function, %queue-zero-p: Private ordinary functions
Function, all-threads: Public ordinary functions
Function, cas-channel-set: Private ordinary functions
Function, channel-being-read-p: Private ordinary functions
Function, channel-being-written-p: Private ordinary functions
Function, clause-type: Private ordinary functions
Function, current-thread: Public ordinary functions
Function, dequeue: Private ordinary functions
Function, enqueue: Private ordinary functions
Function, ensure-list: Private ordinary functions
Function, kill: Public ordinary functions
Function, make-queue: Private ordinary functions
Function, new-worker-thread: Private ordinary functions
Function, nunzip-alist: Private ordinary functions
Function, pcall: Public ordinary functions
Function, pool-health: Public ordinary functions
Function, pooled-tasks: Public ordinary functions
Function, pooled-threads: Public ordinary functions
Function, queue-count: Private ordinary functions
Function, queue-empty-p: Private ordinary functions
Function, queue-full-p: Private ordinary functions
Function, queue-length: Private ordinary functions
Function, queue-peek: Private ordinary functions
Function, queuep: Private ordinary functions
Function, thread-alive-p: Public ordinary functions
Function, thread-name: Public ordinary functions
Function, threadp: Public ordinary functions
Function, unzip-alist: Private ordinary functions
Function, wrap-select-clause: Private ordinary functions

G
Generic Function, (setf channel-readers): Private generic functions
Generic Function, (setf channel-send-return-wait): Private generic functions
Generic Function, (setf channel-value): Private generic functions
Generic Function, (setf channel-vector): Private generic functions
Generic Function, (setf channel-writers): Private generic functions
Generic Function, (setf free-thread-counter): Private generic functions
Generic Function, (setf pool-pending-tasks): Private generic functions
Generic Function, (setf pool-soft-limit): Private generic functions
Generic Function, (setf pool-tasks): Private generic functions
Generic Function, (setf pool-threads): Private generic functions
Generic Function, (setf recv-grabbed-value-p): Private generic functions
Generic Function, (setf task-name): Public generic functions
Generic Function, (setf task-status): Public generic functions
Generic Function, (setf task-thread): Public generic functions
Generic Function, assign-task: Private generic functions
Generic Function, channel-buffered-p: Private generic functions
Generic Function, channel-dequeue: Private generic functions
Generic Function, channel-enqueue: Private generic functions
Generic Function, channel-grab-value: Public generic functions
Generic Function, channel-insert-value: Public generic functions
Generic Function, channel-peek: Private generic functions
Generic Function, channel-pop: Private generic functions
Generic Function, channel-push: Private generic functions
Generic Function, channel-readers: Private generic functions
Generic Function, channel-send-return-wait: Private generic functions
Generic Function, channel-value: Private generic functions
Generic Function, channel-vector: Private generic functions
Generic Function, channel-writers: Private generic functions
Generic Function, channelp: Public generic functions
Generic Function, free-thread-counter: Private generic functions
Generic Function, pool-leader-lock: Private generic functions
Generic Function, pool-leader-notifier: Private generic functions
Generic Function, pool-lock: Private generic functions
Generic Function, pool-pending-tasks: Private generic functions
Generic Function, pool-soft-limit: Private generic functions
Generic Function, pool-tasks: Private generic functions
Generic Function, pool-threads: Private generic functions
Generic Function, queue-condition-queue: Private generic functions
Generic Function, queue-error-attempted-length: Private generic functions
Generic Function, queue-overflow-extra-item: Private generic functions
Generic Function, recv: Public generic functions
Generic Function, recv-blocks-p: Public generic functions
Generic Function, recv-grabbed-value-p: Private generic functions
Generic Function, send: Public generic functions
Generic Function, send-blocks-p: Public generic functions
Generic Function, task-function: Private generic functions
Generic Function, task-name: Public generic functions
Generic Function, task-status: Public generic functions
Generic Function, task-thread: Public generic functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods

K
kill: Public ordinary functions

M
Macro, aif: Private macros
Macro, atomic-incf: Public macros
Macro, awhen: Private macros
Macro, define-print-object: Private macros
Macro, define-speedy-function: Private macros
Macro, econd: Private macros
Macro, fun: Private macros
Macro, pexec: Public macros
Macro, pop-declarations: Private macros
Macro, pushend: Private macros
Macro, select: Public macros
Macro, when-bind: Private macros
Macro, with-cas-read-state: Private macros
Macro, with-cas-write-state: Private macros
Macro, with-channel-slots: Private macros
Macro, with-gensyms: Private macros
Macro, with-read-state: Private macros
Macro, with-write-state: Private macros
make-queue: Private ordinary functions
Method, (setf channel-readers): Private generic functions
Method, (setf channel-send-return-wait): Private generic functions
Method, (setf channel-value): Private generic functions
Method, (setf channel-vector): Private generic functions
Method, (setf channel-writers): Private generic functions
Method, (setf free-thread-counter): Private generic functions
Method, (setf pool-pending-tasks): Private generic functions
Method, (setf pool-soft-limit): Private generic functions
Method, (setf pool-tasks): Private generic functions
Method, (setf pool-threads): Private generic functions
Method, (setf recv-grabbed-value-p): Private generic functions
Method, (setf task-name): Public generic functions
Method, (setf task-status): Public generic functions
Method, (setf task-thread): Public generic functions
Method, assign-task: Private generic functions
Method, channel-buffered-p: Private generic functions
Method, channel-buffered-p: Private generic functions
Method, channel-dequeue: Private generic functions
Method, channel-dequeue: Private generic functions
Method, channel-enqueue: Private generic functions
Method, channel-enqueue: Private generic functions
Method, channel-grab-value: Public generic functions
Method, channel-grab-value: Public generic functions
Method, channel-grab-value: Public generic functions
Method, channel-grab-value: Public generic functions
Method, channel-insert-value: Public generic functions
Method, channel-insert-value: Public generic functions
Method, channel-insert-value: Public generic functions
Method, channel-insert-value: Public generic functions
Method, channel-peek: Private generic functions
Method, channel-peek: Private generic functions
Method, channel-peek: Private generic functions
Method, channel-pop: Private generic functions
Method, channel-push: Private generic functions
Method, channel-readers: Private generic functions
Method, channel-readers: Private generic functions
Method, channel-send-return-wait: Private generic functions
Method, channel-value: Private generic functions
Method, channel-value: Private generic functions
Method, channel-vector: Private generic functions
Method, channel-writers: Private generic functions
Method, channel-writers: Private generic functions
Method, channelp: Public generic functions
Method, channelp: Public generic functions
Method, free-thread-counter: Private generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, pool-leader-lock: Private generic functions
Method, pool-leader-notifier: Private generic functions
Method, pool-lock: Private generic functions
Method, pool-pending-tasks: Private generic functions
Method, pool-soft-limit: Private generic functions
Method, pool-tasks: Private generic functions
Method, pool-threads: Private generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, queue-condition-queue: Private generic functions
Method, queue-error-attempted-length: Private generic functions
Method, queue-overflow-extra-item: Private generic functions
Method, recv: Public generic functions
Method, recv: Public generic functions
Method, recv: Public generic functions
Method, recv: Public generic functions
Method, recv-blocks-p: Public generic functions
Method, recv-blocks-p: Public generic functions
Method, recv-blocks-p: Public generic functions
Method, recv-blocks-p: Public generic functions
Method, recv-blocks-p: Public generic functions
Method, recv-grabbed-value-p: Private generic functions
Method, recv-grabbed-value-p: Private generic functions
Method, send: Public generic functions
Method, send: Public generic functions
Method, send: Public generic functions
Method, send: Public generic functions
Method, send-blocks-p: Public generic functions
Method, send-blocks-p: Public generic functions
Method, send-blocks-p: Public generic functions
Method, send-blocks-p: Public generic functions
Method, send-blocks-p: Public generic functions
Method, task-function: Private generic functions
Method, task-name: Public generic functions
Method, task-status: Public generic functions
Method, task-thread: Public generic functions

N
new-worker-thread: Private ordinary functions
nunzip-alist: Private ordinary functions

P
pcall: Public ordinary functions
pexec: Public macros
pool-health: Public ordinary functions
pool-leader-lock: Private generic functions
pool-leader-lock: Private generic functions
pool-leader-notifier: Private generic functions
pool-leader-notifier: Private generic functions
pool-lock: Private generic functions
pool-lock: Private generic functions
pool-pending-tasks: Private generic functions
pool-pending-tasks: Private generic functions
pool-soft-limit: Private generic functions
pool-soft-limit: Private generic functions
pool-tasks: Private generic functions
pool-tasks: Private generic functions
pool-threads: Private generic functions
pool-threads: Private generic functions
pooled-tasks: Public ordinary functions
pooled-threads: Public ordinary functions
pop-declarations: Private macros
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
pushend: Private macros

Q
queue-condition-queue: Private generic functions
queue-condition-queue: Private generic functions
queue-count: Private ordinary functions
queue-empty-p: Private ordinary functions
queue-error-attempted-length: Private generic functions
queue-error-attempted-length: Private generic functions
queue-full-p: Private ordinary functions
queue-length: Private ordinary functions
queue-overflow-extra-item: Private generic functions
queue-overflow-extra-item: Private generic functions
queue-peek: Private ordinary functions
queuep: Private ordinary functions

R
recv: Public generic functions
recv: Public generic functions
recv: Public generic functions
recv: Public generic functions
recv: Public generic functions
recv-blocks-p: Public generic functions
recv-blocks-p: Public generic functions
recv-blocks-p: Public generic functions
recv-blocks-p: Public generic functions
recv-blocks-p: Public generic functions
recv-blocks-p: Public generic functions
recv-grabbed-value-p: Private generic functions
recv-grabbed-value-p: Private generic functions
recv-grabbed-value-p: Private generic functions

S
select: Public macros
send: Public generic functions
send: Public generic functions
send: Public generic functions
send: Public generic functions
send: Public generic functions
send-blocks-p: Public generic functions
send-blocks-p: Public generic functions
send-blocks-p: Public generic functions
send-blocks-p: Public generic functions
send-blocks-p: Public generic functions
send-blocks-p: Public generic functions

T
task-function: Private generic functions
task-function: Private generic functions
task-name: Public generic functions
task-name: Public generic functions
task-status: Public generic functions
task-status: Public generic functions
task-thread: Public generic functions
task-thread: Public generic functions
thread-alive-p: Public ordinary functions
thread-name: Public ordinary functions
threadp: Public ordinary functions

U
unzip-alist: Private ordinary functions

W
when-bind: Private macros
with-cas-read-state: Private macros
with-cas-write-state: Private macros
with-channel-slots: Private macros
with-gensyms: Private macros
with-read-state: Private macros
with-write-state: Private macros
wrap-select-clause: Private ordinary functions


A.3 Variables

Jump to:   %   *   +  
A   C   F   I   L   N   P   Q   R   S   T   V   W  
Index Entry  Section

%
%thread-pool-soft-limit: Public symbol macros

*
*secret-unbound-value*: Private special variables
*thread-pool*: Private special variables

+
+maximum-buffer-size+: Public constants

A
attempted-length: Private conditions

C
Constant, +maximum-buffer-size+: Public constants

F
free-thread-counter: Private classes
function: Public classes

I
item: Private conditions

L
leader-lock: Private classes
leader-notifier: Private classes
lock: Public classes
lock: Private classes

N
name: Public classes

P
pending-tasks: Private classes

Q
queue: Private conditions
queue-sentinel: Private special variables

R
readers: Public classes
recv-grabbed-value-p: Public classes
recv-ok: Public classes

S
send-ok: Public classes
send-return-wait: Public classes
Slot, attempted-length: Private conditions
Slot, free-thread-counter: Private classes
Slot, function: Public classes
Slot, item: Private conditions
Slot, leader-lock: Private classes
Slot, leader-notifier: Private classes
Slot, lock: Public classes
Slot, lock: Private classes
Slot, name: Public classes
Slot, pending-tasks: Private classes
Slot, queue: Private conditions
Slot, readers: Public classes
Slot, recv-grabbed-value-p: Public classes
Slot, recv-ok: Public classes
Slot, send-ok: Public classes
Slot, send-return-wait: Public classes
Slot, soft-limit: Private classes
Slot, status: Public classes
Slot, tasks: Private classes
Slot, thread: Public classes
Slot, threads: Private classes
Slot, value: Public classes
Slot, vector: Public classes
Slot, writers: Public classes
soft-limit: Private classes
Special Variable, *secret-unbound-value*: Private special variables
Special Variable, *thread-pool*: Private special variables
Special Variable, queue-sentinel: Private special variables
status: Public classes
Symbol Macro, %thread-pool-soft-limit: Public symbol macros

T
tasks: Private classes
thread: Public classes
threads: Private classes

V
value: Public classes
vector: Public classes

W
writers: Public classes


A.4 Data types

Jump to:   A   B   C   F   M   P   Q   S   T   U  
Index Entry  Section

A
abstract-channel: Public classes

B
bounded-channel: Public classes
buffered-channel: Public classes

C
cas-channel: Public classes
chanl: The chanl system
chanl: The chanl package
chanl.asd: The chanl/chanl․asd file
channel: Public classes
channels.lisp: The chanl/src/channels․lisp file
Class, abstract-channel: Public classes
Class, bounded-channel: Public classes
Class, buffered-channel: Public classes
Class, cas-channel: Public classes
Class, channel: Public classes
Class, queue-channel: Public classes
Class, stack-channel: Public classes
Class, task: Public classes
Class, thread-pool: Private classes
Class, unbounded-channel: Public classes
Condition, queue-condition: Private conditions
Condition, queue-length-error: Private conditions
Condition, queue-overflow-error: Private conditions
Condition, queue-underflow-error: Private conditions

F
File, chanl.asd: The chanl/chanl․asd file
File, channels.lisp: The chanl/src/channels․lisp file
File, package.lisp: The chanl/src/package․lisp file
File, queues.lisp: The chanl/src/queues․lisp file
File, select.lisp: The chanl/src/select․lisp file
File, threads.lisp: The chanl/src/threads․lisp file
File, trivial-cas.lisp: The chanl/src/trivial-cas․lisp file
File, utils.lisp: The chanl/src/utils․lisp file

M
Module, src: The chanl/src module

P
Package, chanl: The chanl package
Package, trivial-compare-and-swap: The trivial-compare-and-swap package
package.lisp: The chanl/src/package․lisp file

Q
queue-channel: Public classes
queue-condition: Private conditions
queue-length-error: Private conditions
queue-overflow-error: Private conditions
queue-underflow-error: Private conditions
queues.lisp: The chanl/src/queues․lisp file

S
select.lisp: The chanl/src/select․lisp file
src: The chanl/src module
stack-channel: Public classes
System, chanl: The chanl system

T
task: Public classes
thread-pool: Private classes
threads.lisp: The chanl/src/threads․lisp file
trivial-cas.lisp: The chanl/src/trivial-cas․lisp file
trivial-compare-and-swap: The trivial-compare-and-swap package

U
unbounded-channel: Public classes
utils.lisp: The chanl/src/utils․lisp file