This is the pcall Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:15:44 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
pcall
bordeaux-threads
(system).
pcall-queue
(system).
package.lisp
(file).
task.lisp
(file).
pool.lisp
(file).
pcall.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
pcall/pcall.asd
pcall-queue/pcall-queue.asd
pcall/package.lisp
pcall/task.lisp
pcall/pool.lisp
pcall/pcall.lisp
pcall-queue/queue.lisp
pcall/task.lisp
package.lisp
(file).
pcall
(system).
done-p
(function).
join
(function).
select-one
(function).
execute-task
(function).
task
(class).
task-error
(reader method).
(setf task-error)
(writer method).
task-lock
(reader method).
task-status
(reader method).
(setf task-status)
(writer method).
task-thunk
(reader method).
task-values
(reader method).
(setf task-values)
(writer method).
task-wait-locks
(reader method).
(setf task-wait-locks)
(writer method).
task-waiting
(reader method).
(setf task-waiting)
(writer method).
with-locks
(function).
pcall/pool.lisp
task.lisp
(file).
pcall
(system).
finish-tasks
(function).
set-worker-environment
(function).
thread-pool-size
(function).
(setf thread-pool-size)
(function).
with-local-thread-pool
(macro).
*pool*
(special variable).
audit-thread-pool
(function).
copy-pool
(function).
make-pool
(function).
pool
(structure).
pool-env
(reader).
(setf pool-env)
(writer).
pool-lock
(reader).
(setf pool-lock)
(writer).
pool-p
(function).
pool-queue
(reader).
(setf pool-queue)
(writer).
pool-size
(reader).
(setf pool-size)
(writer).
pool-threads
(reader).
(setf pool-threads)
(writer).
spawn-thread
(function).
stop-at-once-p
(reader method).
stop-running
(condition).
stop-thread
(function).
worker-thread
(function).
pcall-queue/queue.lisp
pcall-queue
(system).
make-queue
(function).
queue-empty-p
(function).
queue-length
(function).
queue-pop
(function).
queue-push
(function).
queue-wait
(function).
copy-node
(function).
make-node
(function).
node
(structure).
node-next
(reader).
(setf node-next)
(writer).
node-p
(function).
node-prev
(reader).
(setf node-prev)
(writer).
node-val
(reader).
(setf node-val)
(writer).
queue
(class).
queue-back
(reader method).
(setf queue-back)
(writer method).
queue-condition
(reader method).
queue-do-pop
(function).
queue-front
(reader method).
(setf queue-front)
(writer method).
queue-lock
(reader method).
Packages are listed by definition order.
pcall
bordeaux-threads
.
common-lisp
.
pcall-queue
.
done-p
(function).
finish-tasks
(function).
join
(function).
pcall
(function).
pexec
(macro).
plet
(macro).
select-one
(function).
set-worker-environment
(function).
thread-pool-size
(function).
(setf thread-pool-size)
(function).
with-local-thread-pool
(macro).
*pool*
(special variable).
audit-thread-pool
(function).
copy-pool
(function).
execute-task
(function).
make-pool
(function).
pool
(structure).
pool-env
(reader).
(setf pool-env)
(writer).
pool-lock
(reader).
(setf pool-lock)
(writer).
pool-p
(function).
pool-queue
(reader).
(setf pool-queue)
(writer).
pool-size
(reader).
(setf pool-size)
(writer).
pool-threads
(reader).
(setf pool-threads)
(writer).
spawn-thread
(function).
stop-at-once-p
(generic reader).
stop-running
(condition).
stop-thread
(function).
task
(class).
task-error
(generic reader).
(setf task-error)
(generic writer).
task-lock
(generic reader).
task-status
(generic reader).
(setf task-status)
(generic writer).
task-thunk
(generic reader).
task-values
(generic reader).
(setf task-values)
(generic writer).
task-wait-locks
(generic reader).
(setf task-wait-locks)
(generic writer).
task-waiting
(generic reader).
(setf task-waiting)
(generic writer).
with-locks
(function).
worker-thread
(function).
pcall-queue
bordeaux-threads
.
common-lisp
.
make-queue
(function).
queue-empty-p
(function).
queue-length
(function).
queue-pop
(function).
queue-push
(function).
queue-wait
(function).
copy-node
(function).
make-node
(function).
node
(structure).
node-next
(reader).
(setf node-next)
(writer).
node-p
(function).
node-prev
(reader).
(setf node-prev)
(writer).
node-val
(reader).
(setf node-val)
(writer).
queue
(class).
queue-back
(generic reader).
(setf queue-back)
(generic writer).
queue-condition
(generic reader).
queue-do-pop
(function).
queue-front
(generic reader).
(setf queue-front)
(generic writer).
queue-lock
(generic reader).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Shorthand for pcall.
Run body with a fresh thread pool. If on-unwind is :wait, it will wait for all tasks to finish before returning. If it is :leave, the form will return while threads are still working. If it is :stop or :destroy, the threads will be stopped at the end of the body. With :stop, they will first finish their current task (if any), with :destroy, they will be brutally destroyed and might leak resources, leave stuff in inconsistent state, etc.
Join a task, meaning stop execution of the current thread until the result of the task is available, and then return this result. When this is called on a task that no thread is currently working on, the current thread executes the task directly.
Create an empty queue.
Call a thunk in parallel. Returns a task that can be joined. When an exclusive is given, the task will only run when no other tasks with that exclusive are running.
Test whether a queue is empty.
Find the length of a queue.
Pop an element from the front of a queue. Returns immediately, returning nil if the queue is empty, and a second value indicating whether anything was popped.
Push an element onto the back of a queue.
Pop an element from the front of a queue. Causes a blocking wait when no elements are available.
Returns the first task that can be joined without blocking.
Make sure the thread pool holds the correct amount of live threads.
Execute a task, and store the result or error in the task object. When a task’s status is not :free, that means the joiner has already started executing it, so this thread should leave it alone.
next
.
prev
.
The code running inside the pooled threads. Repeatedly tries to take a task from the queue, and handles it.
stop-running
)) ¶condition
.
:at-once-p
This slot is read-only.
structure-object
.
3
bordeaux-threads
.
(bordeaux-threads:make-lock)
(pcall-queue:make-queue)
bordeaux-threads
.
(bordeaux-threads:make-lock)
This slot is read-only.
common-lisp
.
(bordeaux-threads:make-condition-variable)
This slot is read-only.
A task is a piece of code that is scheduled to run in the thread pool.
:thunk
This slot is read-only.
common-lisp
.
common-lisp
.
bordeaux-threads
.
(bordeaux-threads:make-lock)
This slot is read-only.
:free
Jump to: | (
A C D E F G J M N P Q S T W |
---|
Jump to: | (
A C D E F G J M N P Q S T W |
---|
Jump to: | *
A B C E F L N P Q S T V W |
---|
Jump to: | *
A B C E F L N P Q S T V W |
---|
Jump to: | C F N P Q S T |
---|
Jump to: | C F N P Q S T |
---|