This is the eager-future2 Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:01:26 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
eager-future2
Parallel programming library providing the futures/promises synchronization mechanism
Vladimir Sedach <vas@oneofus.la>
LGPL-3.0-or-later
bordeaux-threads
(system).
trivial-garbage
(system).
package.lisp
(file).
scheduler.lisp
(file).
make-future.lisp
(file).
future.lisp
(file).
library.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
eager-future2/eager-future2.asd
eager-future2/package.lisp
eager-future2/scheduler.lisp
eager-future2/make-future.lisp
eager-future2/future.lisp
eager-future2/library.lisp
eager-future2/scheduler.lisp
package.lisp
(file).
eager-future2
(system).
advise-thread-pool-size
(function).
thread-pool-size
(function).
*free-threads*
(special variable).
*leader-notifier*
(special variable).
*task-queue*
(special variable).
*task-queue-lock*
(special variable).
*thread-counter-lock*
(special variable).
*total-threads*
(special variable).
make-pool-thread
(function).
schedule-immediate
(function).
schedule-last
(function).
eager-future2/make-future.lisp
scheduler.lisp
(file).
eager-future2
(system).
*default-future-type*
(special variable).
pcall
(function).
*computing-future*
(special variable).
abort-scheduled-future-task
(function).
make-scheduler-task
(function).
schedule-future
(function).
eager-future2/future.lisp
make-future.lisp
(file).
eager-future2
(system).
%ready-to-yield?
(function).
%values
(reader method).
(setf %values)
(writer method).
computing-thread
(reader method).
(setf computing-thread)
(writer method).
error-descriptor
(reader method).
(setf error-descriptor)
(writer method).
future-id
(reader method).
make-future
(function).
proxy-restart
(reader method).
(setf proxy-restart)
(writer method).
restart-notifier
(reader method).
(setf restart-notifier)
(writer method).
task
(reader method).
(setf task)
(writer method).
wait-list
(reader method).
(setf wait-list)
(writer method).
eager-future2/library.lisp
future.lisp
(file).
eager-future2
(system).
force-all
(function).
iterate-futures
(function).
pand
(macro).
pexec
(macro).
pfuncall
(macro).
plet
(macro).
por
(macro).
select-timeout
(function).
touch
(function).
Packages are listed by definition order.
eager-future2
bordeaux-threads
.
common-lisp
.
trivial-garbage
.
*default-future-type*
(special variable).
advise-thread-pool-size
(function).
force
(function).
force-all
(function).
future
(class).
iterate-futures
(function).
pand
(macro).
pcall
(function).
pexec
(macro).
pfuncall
(macro).
plet
(macro).
por
(macro).
ready-to-yield?
(function).
select
(function).
select-timeout
(function).
thread-pool-size
(function).
touch
(function).
yield
(function).
%ready-to-yield?
(function).
%values
(generic reader).
(setf %values)
(generic writer).
*computing-future*
(special variable).
*free-threads*
(special variable).
*leader-notifier*
(special variable).
*task-queue*
(special variable).
*task-queue-lock*
(special variable).
*thread-counter-lock*
(special variable).
*total-threads*
(special variable).
abort-scheduled-future-task
(function).
computing-thread
(generic reader).
(setf computing-thread)
(generic writer).
error-descriptor
(generic reader).
(setf error-descriptor)
(generic writer).
future-id
(generic reader).
make-future
(function).
make-pool-thread
(function).
make-scheduler-task
(function).
proxy-restart
(generic reader).
(setf proxy-restart)
(generic writer).
restart-notifier
(generic reader).
(setf restart-notifier)
(generic writer).
schedule-future
(function).
schedule-immediate
(function).
schedule-last
(function).
task
(generic reader).
(setf task)
(generic writer).
wait-list
(generic reader).
(setf wait-list)
(generic writer).
Definitions are sorted by export status, category, package, and then by lexicographic order.
One of :eager, :speculative (default) or :lazy.
If eager, any newly created futures start their computation immediately.
If speculative, newly created futures are computed when thread pool threads are available, in FIFO future creation order.
If lazy, newly created futures are not computed until asked to yield their values.
Evaluates expressions in parallel. If any expression yields nil, terminates all outstanding computations and returns nil. If all expressions yield a non-nil value, returns t.
Shorthand for (pcall (lambda () ...))
Evaluates args in parallel before funcalling the given function on them.
Like LET, but all bindings are evaluated asynchronously.
Evaluates expressions in parallel. Returns the value of the first expression that yields a non-nil value. If all expressions evaluate to nil, returns nil.
Attempts to set the amount of threads in the thread pool to given value.
If the future has not yet yielded a value, installs the given values as the yield-values of the future (stopping any ongoing computation of the future).
Calls force on all given future with values. Useful to stop remaining computations in for example iterate-futures.
Calls proc on each future in select order. Proc is a procedure that takes the currently yieldable future as its first argument, and the list of futures not yet processed as its second. Futures need to be yielded by proc - this is done so that proc can have control of error handling. The second argument is useful to for example be able to terminate remaining computations before a non-local control transfer.
Given a function of no arguments, returns an object (called a
future) that can later be used to retrieve the values computed by the
function.
future-type (by default the value of *default-future-type*) can either
be :eager, :speculative, or :lazy. See the documentation of
*default-future-type* for an explanation of the different future
types.
The function is called in an unspecified dynamic environment.
Returns non-nil if the future values have been computed, nil otherwise.
Returns the first future that is ready to yield.
Given a timeout (in seconds) and a set of futures, returns either nil if no futures are ready to yield when timeout seconds have elapsed, or the first yieldable future otherwise.
Returns the current number of threads in the thread pool. This number determines the maximum amount of speculative futures that can be computed at the same time.
If x is a future, yields its value, otherwise returns x.
Returns the computed values of the future.
In case of a delayed future, computes the value of the future in the
current thread.
In case of a speculative future, if no other thread is computing the
value of the future, computes the value in the current thread. If
another thread is currently computing the value of the future, blocks
until the value is available.
In case of an eager future, blocks until the value is available.
future
)) ¶automatically generated reader method
bordeaux-threads
.
lock
.
common-lisp
.
bordeaux-threads
.
(bordeaux-threads:make-lock "future lock")
lock
.
This slot is read-only.
Part of scheduling protocol for thread-pooled futures.
Jump to: | %
(
A C E F G I L M P R S T W Y |
---|
Jump to: | %
(
A C E F G I L M P R S T W Y |
---|
Jump to: | *
C E F L P R S T V W |
---|
Jump to: | *
C E F L P R S T V W |
---|
Jump to: | C E F L M P S |
---|
Jump to: | C E F L M P S |
---|