Library for asynchronous non-blocking concurrency in Common Lisp. Quite similar to what green threads are for. In other buzzy words, it is a computation tree building library mixed with data-flow model for non-blocking, asynchronous and thread-safe execution.
flow:atomically) operator marks atomic block of code that could be dispatched
flow:serially) operator encloses forms for them to be executed serially, but possibly in
different threads, returning the value of the last atomic block or flow.
flow:concurrently) operator denotes forms that are going to be run in parallel, returning
list of form results in the same order they were specified.
flow:dynamically) denotes block that generates new flow dynamically during parent flow
execution. In other words, injects new dynamically created flow into current one.
flow:asynchronously) allows to split the flow and continue or interrupt its execution at
later time by calling
Code is fully asynchronous and thread-safe with no blocking required (see Memory Model note
below). Results of previously executed block (denoted by
->) “flows” into a next code block
and is bound as argument to this next block.
See Getting Started page.
cl-flow library uses lock-free atomic functions not defined in CL standard
and, unfortunately, not widely supported by implementations either. This said,
actually tested and known to work in:
Not tested for, but exptected to work in: