This is the cl-async-future Reference Manual, version 0.4.4.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 03:43:45 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-async-future
A futures implementation for Common Lisp. Plugs in nicely to cl-async.
Andrew Danger Lyon <orthecreedence@gmail.com>
MIT
0.4.4.1
blackbird
(system).
package.lisp
(file).
future.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-async-future/cl-async-future.asd
cl-async-future
(system).
cl-async-future/future.lisp
package.lisp
(file).
cl-async-future
(system).
future
(class).
future-handler-case
(macro).
make-future
(function).
%handler-case
(macro).
forward-function
(macro).
forward-macro
(macro).
promise-preserve-callbacks
(reader method).
(setf promise-preserve-callbacks)
(writer method).
promise-reattach-callbacks
(reader method).
(setf promise-reattach-callbacks)
(writer method).
str-replace
(function).
with-forwarded
(macro).
wrap-event-handler
(macro).
Packages are listed by definition order.
cl-async-future
asf
blackbird
.
blackbird-base
.
blackbird-syntax
.
common-lisp
.
future
(class).
future-finished-p
(generic function).
future-handler-case
(macro).
futurep
(function).
lookup-forwarded-future
(function).
make-future
(function).
multiple-future-bind
(macro).
reset-future
(function).
wait-for
(macro).
%handler-case
(macro).
forward-function
(macro).
forward-macro
(macro).
future-values
(generic function).
promise-preserve-callbacks
(generic reader).
(setf promise-preserve-callbacks)
(generic writer).
promise-reattach-callbacks
(generic reader).
(setf promise-reattach-callbacks)
(generic writer).
str-replace
(function).
with-forwarded
(macro).
wrap-event-handler
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Wrap all of our lovely attach macro up with an event handler. This is more or
less restricted to the form it’s run in.
Note that we only have to wrap (attach) because *all other syntax macros* use
attach. This greatly simplifies our code.
Note that if we just wrap ‘attach‘ directly in a macrolet, it expands infinitely (probably no what we want). So we’re doing some trickery here. We use the environment from the top-level macro to grab the original macro function and make it available from *within* the macrolet. This allows the macrolet to redefine the ‘attach‘ macro while also simultaneously expanding the previous definition of it. This allows wrapped calls of future-handler-case to add layers of error handling around any ‘attach‘ call that is within lexical grasp.
Like multiple-value-bind, but instead of a form that evaluates to multiple values, takes a form that generates a promise.
multiple-promise-bind
.
Wait for a promise to finish, ignoring any values it returns. Can be useful when you want to run an async action but don’t care about the return value (or it doesn’t return a value) and you want to continue processing when it returns.
wait
.
Is this a promise?
promisep
.
This function follows forwarded promises until it finds the last in the chain of forwarding.
lookup-forwarded-promise
.
Create a blank future.
Clear out all callbacks/errbacks. Useful for halting a promise’s execution.
reset-promise
.
promise-finished-p
.
promise
.
When nil (the default) detaches callbacks after running promise.
:preserve-callbacks
When a promise’s callback returns another promise, bind all
callbacks from this promise onto the returned one. Allows
values to transparently be derived from many layers deep of
promises, almost like a real call stack.
t
:reattach-callbacks
Simple wrapper around handler-case that allows switching out the form to make macroexpansion a lot easier to deal with.
Used to wrap the future-generation forms of future syntax macros. This macro
is not to be used directly, but instead by future-handler-case.
It allows itself to be recursive, but any recursions will simply add their
error forms for a top-level list and return the form they are given as the
body. This allows a top-level form to add an error handler to a future, while
gathering the lower-level forms’ handler-case bindings into one big handler
function (created with make-nexted-handler-cases).
Note that since normally the wrap-event-handler forms expand outside in, we have to do some trickery with the error-handling functions to make sure the order of the handler-case forms (as far as what level of the tree we’re on) are preserved.
Replace a portion of a string with another.
promise-values
.
future
)) ¶future
)) ¶When a promise’s callback returns another promise, bind all
callbacks from this promise onto the returned one. Allows
values to transparently be derived from many layers deep of
promises, almost like a real call stack.
Jump to: | %
(
F G L M P R S W |
---|
Jump to: | %
(
F G L M P R S W |
---|
Jump to: | P R S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
P | |||
preserve-callbacks : | Public classes | ||
| |||
R | |||
reattach-callbacks : | Public classes | ||
| |||
S | |||
Slot, preserve-callbacks : | Public classes | ||
Slot, reattach-callbacks : | Public classes | ||
|
Jump to: | P R S |
---|
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|