Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-async-future Reference Manual, version 0.4.4.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 12:04:07 2020 GMT+0.
• Introduction | What cl-async-future is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
This is a standalone library for futures in Common Lisp that was originally part of cl-async.
Documentation for cl-async-future lives on the cl-async website.
The test suite can be run by doing the following:
(ql:quickload :cl-async-future-test)
(cl-async-future-test:run-tests)
MIT.
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The cl-async-future system |
Andrew Danger Lyon <orthecreedence@gmail.com>
MIT
A futures implementation for Common Lisp. Plugs in nicely to cl-async.
0.4.4.1
blackbird
cl-async-future.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The cl-async-future.asd file | ||
• The cl-async-future/package.lisp file | ||
• The cl-async-future/future.lisp file |
Next: The cl-async-future/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
cl-async-future.asd
cl-async-future (system)
Next: The cl-async-future/future․lisp file, Previous: The cl-async-future․asd file, Up: Lisp files [Contents][Index]
cl-async-future (system)
package.lisp
Previous: The cl-async-future/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
cl-async-future (system)
future.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The cl-async-future package |
package.lisp (file)
asf
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported classes |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
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.
future.lisp (file)
Like multiple-value-bind, but instead of a form that evaluates to multiple values, takes a form that generates a promise.
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/syntax.lisp
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.
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/syntax.lisp
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Is this a promise?
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/promise.lisp
This function follows forwarded promises until it finds the last in the chain of forwarding.
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/promise.lisp
Create a blank future.
future.lisp (file)
Clear out all callbacks/errbacks. Useful for halting a promise’s execution.
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/promise.lisp
Next: Exported classes, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Marks if a promise has been finished or not.
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/promise.lisp
Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
future.lisp (file)
promise (class)
When nil (the default) detaches callbacks after running promise.
:preserve-callbacks
promise-preserve-callbacks (generic function)
(setf promise-preserve-callbacks) (generic function)
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.
:reattach-callbacks
t
promise-reattach-callbacks (generic function)
(setf promise-reattach-callbacks) (generic function)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal macros | ||
• Internal functions | ||
• Internal generic functions |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
Simple wrapper around handler-case that allows switching out the form to make macroexpansion a lot easier to deal with.
future.lisp (file)
future.lisp (file)
future.lisp (file)
future.lisp (file)
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.
future.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
Replace a portion of a string with another.
future.lisp (file)
Previous: Internal functions, Up: Internal definitions [Contents][Index]
Holds the finished value(s) of the promise.
/home/quickref/quicklisp/dists/quicklisp/software/blackbird-20160531-git/promise.lisp
When nil (the default) detaches callbacks after running promise.
future.lisp (file)
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.
future.lisp (file)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L |
---|
Jump to: | C F L |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
F G L M P R S W |
---|
Jump to: | %
(
F G L M P R S W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | P R S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
P | |||
preserve-callbacks : | Exported classes | ||
| |||
R | |||
reattach-callbacks : | Exported classes | ||
| |||
S | |||
Slot, preserve-callbacks : | Exported classes | ||
Slot, reattach-callbacks : | Exported classes | ||
|
Jump to: | P R S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|