The cl-flow Reference Manual

This is the cl-flow Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 16:56:12 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-flow

Data-flow driven concurrency model for Common Lisp

Author

Pavel Korolev

Contact

License

MIT

Version

1.0.0

Dependencies
  • alexandria (system).
  • cl-muth (system).
Source

cl-flow.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-flow/cl-flow.asd

Source

cl-flow.asd.

Parent Component

cl-flow (system).

ASDF Systems

cl-flow.


3.1.2 cl-flow/packages.lisp

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Packages

cl-flow.


3.1.3 cl-flow/utils.lisp

Dependency

packages.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Internals

+optimize-form+ (constant).


3.1.4 cl-flow/context.lisp

Dependency

utils.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

3.1.5 cl-flow/flow.lisp

Dependency

context.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Internals

3.1.6 cl-flow/atomically.lisp

Dependency

flow.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

dispatch-atomically (function).


3.1.7 cl-flow/serially.lisp

Dependency

atomically.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

dispatch-serially (function).


3.1.8 cl-flow/concurrently.lisp

Dependency

serially.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

3.1.9 cl-flow/dynamically.lisp

Dependency

concurrently.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

dispatch-dynamically (function).


3.1.10 cl-flow/asynchronously.lisp

Dependency

dynamically.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

dispatch-asynchronously (function).


3.1.11 cl-flow/repeatedly.lisp

Dependency

asynchronously.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface
Internals

dispatch-repeatedly (function).


3.1.12 cl-flow/run.lisp

Dependency

repeatedly.lisp (file).

Source

cl-flow.asd.

Parent Component

cl-flow (system).

Public Interface

run (function).


4 Packages

Packages are listed by definition order.


4.1 cl-flow

Source

packages.lisp.

Nickname

flow

Use List
  • alexandria.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *flow-value*
Package

cl-flow.


5.1.2 Macros

Macro: %> (lambda-list &body body)

See flow:asynchronously

Package

cl-flow.

Source

asynchronously.lisp.

Macro: -> (invariant &body args)

See flow:atomically

Package

cl-flow.

Source

atomically.lisp.

Macro: ->> (lambda-list &body body)

See flow:dynamically

Package

cl-flow.

Source

dynamically.lisp.

Macro: >> (&rest flow)

See flow:serially

Package

cl-flow.

Source

serially.lisp.

Macro: asynchronously (lambda-list &body body)

Splits current flow allowing manually managing its execution via #’continue-flow and #’interrupt-flow functions. Consing: ~32 bytes per invocation

Package

cl-flow.

Source

asynchronously.lisp.

Macro: atomically (invariant &body args)

Encloses atomic flow block of code that can be dispatched concurrently. Non-consing.

Package

cl-flow.

Source

atomically.lisp.

Macro: concurrently (&body flow)

Executes child elements in parallel, returning a list of results for child blocks or flows in the same order they were specified. Heavy consing.

Package

cl-flow.

Source

concurrently.lisp.

Macro: dynamically (lambda-list &body body)

Generates new flow dynamically during parent flow execution. In other words, injects new dynamically created flow into a current one. Non-consing.

Package

cl-flow.

Source

dynamically.lisp.

Macro: o> (condition &body body)

See flow:repeatedly

Package

cl-flow.

Source

repeatedly.lisp.

Macro: repeatedly (live-test-form &body flow)

Short-circuit the flow specified inside the block and executes it repeatedly in loop until LIVE-TEST-FORM evaluates to NIL. Result from the last iteration will be passed to the next block. Non-consing.

Package

cl-flow.

Source

repeatedly.lisp.

Macro: serially (&body flow)

Executes child elements serially (but possibly in different threads) returning a value of the last atomic block or flow. Non-consing.

Package

cl-flow.

Source

serially.lisp.

Macro: ~> (&rest body)

See flow:concurrently

Package

cl-flow.

Source

concurrently.lisp.


5.1.3 Ordinary functions

Function: continue-flow (&optional value)

Invokes next flow block with provided value as an argument

Package

cl-flow.

Source

asynchronously.lisp.

Function: inject-flow (flow)
Package

cl-flow.

Source

context.lisp.

Function: interrupt-flow (&optional condition)

Interrupts flow with provided condition

Package

cl-flow.

Source

asynchronously.lisp.

Function: rerun-flow-block ()
Package

cl-flow.

Source

context.lisp.

Function: run (dispatcher flow)

Dispatcher must be a function with lambda-list congruent to (task arg invariant &key &allow-other-keys)

Package

cl-flow.

Source

run.lisp.

Function: skip-flow-block ()
Package

cl-flow.

Source

context.lisp.

Function: use-flow-block-value (value)
Package

cl-flow.

Source

context.lisp.


5.2 Internals


5.2.1 Constants

Constant: +min-stack-extension+
Package

cl-flow.

Source

context.lisp.

Constant: +optimize-form+
Package

cl-flow.

Source

utils.lisp.


5.2.2 Special variables

Special Variable: *continue*
Package

cl-flow.

Source

context.lisp.

Special Variable: *current-context*
Package

cl-flow.

Source

context.lisp.

Special Variable: *parent-context*
Package

cl-flow.

Source

context.lisp.


5.2.3 Macros

Macro: %flow-lambda ((flow-context) &body body)
Package

cl-flow.

Source

flow.lisp.

Macro: %with-flow-function ((fu-name fu-lambda-list &body fu-body) &body body)
Package

cl-flow.

Source

flow.lisp.

Macro: flow-lambda-macro ((flow-context) &body body)
Package

cl-flow.

Source

flow.lisp.

Macro: with-flow-function-macro ((fu-name fu-lambda-list fu-body) &body body)
Package

cl-flow.

Source

flow.lisp.

Macro: with-flow-let-macro ((var flow) &body body)
Package

cl-flow.

Source

flow.lisp.


5.2.4 Ordinary functions

Function: %%inject-invoke (flow)
Package

cl-flow.

Source

context.lisp.

Function: %%inject-invoke-text (stream)
Package

cl-flow.

Source

context.lisp.

Function: %%rerun-invoke ()
Package

cl-flow.

Source

context.lisp.

Function: %%rerun-invoke-text (stream)
Package

cl-flow.

Source

context.lisp.

Function: %%skip-invoke ()
Package

cl-flow.

Source

context.lisp.

Function: %%skip-invoke-text (stream)
Package

cl-flow.

Source

context.lisp.

Function: %%use-invoke (value)
Package

cl-flow.

Source

context.lisp.

Function: %%use-invoke-text (stream)
Package

cl-flow.

Source

context.lisp.

Function: %dispatch-concurrently (parent-context flow)
Package

cl-flow.

Source

concurrently.lisp.

Function: %dispatch-rest (flow-context)
Package

cl-flow.

Source

context.lisp.

Function: %invoke-with-restarts (fu arg)
Package

cl-flow.

Source

context.lisp.

Function: capture-flow-value (context value)
Package

cl-flow.

Source

context.lisp.

Function: chop-head (context)
Package

cl-flow.

Source

context.lisp.

Function: copy-flow-context (instance)
Package

cl-flow.

Source

context.lisp.

Function: dispatch (context task invariant &rest args &key &allow-other-keys)
Package

cl-flow.

Source

context.lisp.

Function: dispatch-asynchronously (flow-context body-fu)
Package

cl-flow.

Source

asynchronously.lisp.

Function: dispatch-atomically (context fu invariant &rest opts &key &allow-other-keys)
Package

cl-flow.

Source

atomically.lisp.

Function: dispatch-concurrently (parent-context flow)
Package

cl-flow.

Source

concurrently.lisp.

Function: dispatch-dynamically (flow-context body-fu)
Package

cl-flow.

Source

dynamically.lisp.

Function: dispatch-repeatedly (flow-context test-fu flow)
Package

cl-flow.

Source

repeatedly.lisp.

Function: dispatch-rest (context)
Package

cl-flow.

Source

context.lisp.

Function: dispatch-serially (flow-context flow)
Package

cl-flow.

Source

serially.lisp.

Reader: flow-context-dispatcher (instance)
Writer: (setf flow-context-dispatcher) (instance)
Package

cl-flow.

Source

context.lisp.

Target Slot

dispatcher.

Reader: flow-context-function (instance)
Writer: (setf flow-context-function) (instance)
Package

cl-flow.

Source

context.lisp.

Target Slot

function.

Reader: flow-context-native-dispatcher (instance)
Package

cl-flow.

Source

context.lisp.

Target Slot

native-dispatcher.

Function: flow-context-p (object)
Package

cl-flow.

Source

context.lisp.

Reader: flow-context-parent (instance)
Package

cl-flow.

Source

context.lisp.

Target Slot

parent.

Reader: flow-context-stack (instance)
Package

cl-flow.

Source

context.lisp.

Target Slot

stack.

Reader: flow-context-value (instance)
Writer: (setf flow-context-value) (instance)
Package

cl-flow.

Source

context.lisp.

Target Slot

value.

Function: init-context-dispatcher (context)
Package

cl-flow.

Source

context.lisp.

Function: invoke-flow-function (context)
Package

cl-flow.

Source

context.lisp.

Function: invoke-with-restarts (flow-context fu arg)
Package

cl-flow.

Source

context.lisp.

Function: make-child-flow-context (parent-context)
Package

cl-flow.

Source

context.lisp.

Function: make-flow-context (&key native-dispatcher dispatcher value function stack parent)
Package

cl-flow.

Source

context.lisp.

Function: parse-atomic-block-args (args)
Package

cl-flow.

Source

flow.lisp.

Function: push-flow-stack (context flow)
Package

cl-flow.

Source

context.lisp.

Function: try-restart (restart-name &optional arg)
Package

cl-flow.

Source

context.lisp.


5.2.5 Structures

Structure: flow-context
Package

cl-flow.

Source

context.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: native-dispatcher
Type

(or null function)

Readers

flow-context-native-dispatcher.

Writers

This slot is read-only.

Slot: dispatcher
Type

(or null function)

Readers

flow-context-dispatcher.

Writers

(setf flow-context-dispatcher).

Slot: value
Readers

flow-context-value.

Writers

(setf flow-context-value).

Slot: function
Package

common-lisp.

Type

(or null function)

Readers

flow-context-function.

Writers

(setf flow-context-function).

Slot: stack
Type

array

Initform

(make-array cl-flow::+min-stack-extension+ :element-type (quote list) :initial-element nil :fill-pointer 0 :adjustable t)

Readers

flow-context-stack.

Writers

This slot is read-only.

Slot: parent
Type

(or null cl-flow::flow-context)

Readers

flow-context-parent.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (   -   >   ~  
A   C   D   F   I   M   O   P   R   S   T   U   W  
Index Entry  Section

%
%%inject-invoke: Private ordinary functions
%%inject-invoke-text: Private ordinary functions
%%rerun-invoke: Private ordinary functions
%%rerun-invoke-text: Private ordinary functions
%%skip-invoke: Private ordinary functions
%%skip-invoke-text: Private ordinary functions
%%use-invoke: Private ordinary functions
%%use-invoke-text: Private ordinary functions
%>: Public macros
%dispatch-concurrently: Private ordinary functions
%dispatch-rest: Private ordinary functions
%flow-lambda: Private macros
%invoke-with-restarts: Private ordinary functions
%with-flow-function: Private macros

(
(setf flow-context-dispatcher): Private ordinary functions
(setf flow-context-function): Private ordinary functions
(setf flow-context-value): Private ordinary functions

-
->: Public macros
->>: Public macros

>
>>: Public macros

~
~>: Public macros

A
asynchronously: Public macros
atomically: Public macros

C
capture-flow-value: Private ordinary functions
chop-head: Private ordinary functions
concurrently: Public macros
continue-flow: Public ordinary functions
copy-flow-context: Private ordinary functions

D
dispatch: Private ordinary functions
dispatch-asynchronously: Private ordinary functions
dispatch-atomically: Private ordinary functions
dispatch-concurrently: Private ordinary functions
dispatch-dynamically: Private ordinary functions
dispatch-repeatedly: Private ordinary functions
dispatch-rest: Private ordinary functions
dispatch-serially: Private ordinary functions
dynamically: Public macros

F
flow-context-dispatcher: Private ordinary functions
flow-context-function: Private ordinary functions
flow-context-native-dispatcher: Private ordinary functions
flow-context-p: Private ordinary functions
flow-context-parent: Private ordinary functions
flow-context-stack: Private ordinary functions
flow-context-value: Private ordinary functions
flow-lambda-macro: Private macros
Function, %%inject-invoke: Private ordinary functions
Function, %%inject-invoke-text: Private ordinary functions
Function, %%rerun-invoke: Private ordinary functions
Function, %%rerun-invoke-text: Private ordinary functions
Function, %%skip-invoke: Private ordinary functions
Function, %%skip-invoke-text: Private ordinary functions
Function, %%use-invoke: Private ordinary functions
Function, %%use-invoke-text: Private ordinary functions
Function, %dispatch-concurrently: Private ordinary functions
Function, %dispatch-rest: Private ordinary functions
Function, %invoke-with-restarts: Private ordinary functions
Function, (setf flow-context-dispatcher): Private ordinary functions
Function, (setf flow-context-function): Private ordinary functions
Function, (setf flow-context-value): Private ordinary functions
Function, capture-flow-value: Private ordinary functions
Function, chop-head: Private ordinary functions
Function, continue-flow: Public ordinary functions
Function, copy-flow-context: Private ordinary functions
Function, dispatch: Private ordinary functions
Function, dispatch-asynchronously: Private ordinary functions
Function, dispatch-atomically: Private ordinary functions
Function, dispatch-concurrently: Private ordinary functions
Function, dispatch-dynamically: Private ordinary functions
Function, dispatch-repeatedly: Private ordinary functions
Function, dispatch-rest: Private ordinary functions
Function, dispatch-serially: Private ordinary functions
Function, flow-context-dispatcher: Private ordinary functions
Function, flow-context-function: Private ordinary functions
Function, flow-context-native-dispatcher: Private ordinary functions
Function, flow-context-p: Private ordinary functions
Function, flow-context-parent: Private ordinary functions
Function, flow-context-stack: Private ordinary functions
Function, flow-context-value: Private ordinary functions
Function, init-context-dispatcher: Private ordinary functions
Function, inject-flow: Public ordinary functions
Function, interrupt-flow: Public ordinary functions
Function, invoke-flow-function: Private ordinary functions
Function, invoke-with-restarts: Private ordinary functions
Function, make-child-flow-context: Private ordinary functions
Function, make-flow-context: Private ordinary functions
Function, parse-atomic-block-args: Private ordinary functions
Function, push-flow-stack: Private ordinary functions
Function, rerun-flow-block: Public ordinary functions
Function, run: Public ordinary functions
Function, skip-flow-block: Public ordinary functions
Function, try-restart: Private ordinary functions
Function, use-flow-block-value: Public ordinary functions

I
init-context-dispatcher: Private ordinary functions
inject-flow: Public ordinary functions
interrupt-flow: Public ordinary functions
invoke-flow-function: Private ordinary functions
invoke-with-restarts: Private ordinary functions

M
Macro, %>: Public macros
Macro, %flow-lambda: Private macros
Macro, %with-flow-function: Private macros
Macro, ->: Public macros
Macro, ->>: Public macros
Macro, >>: Public macros
Macro, asynchronously: Public macros
Macro, atomically: Public macros
Macro, concurrently: Public macros
Macro, dynamically: Public macros
Macro, flow-lambda-macro: Private macros
Macro, o>: Public macros
Macro, repeatedly: Public macros
Macro, serially: Public macros
Macro, with-flow-function-macro: Private macros
Macro, with-flow-let-macro: Private macros
Macro, ~>: Public macros
make-child-flow-context: Private ordinary functions
make-flow-context: Private ordinary functions

O
o>: Public macros

P
parse-atomic-block-args: Private ordinary functions
push-flow-stack: Private ordinary functions

R
repeatedly: Public macros
rerun-flow-block: Public ordinary functions
run: Public ordinary functions

S
serially: Public macros
skip-flow-block: Public ordinary functions

T
try-restart: Private ordinary functions

U
use-flow-block-value: Public ordinary functions

W
with-flow-function-macro: Private macros
with-flow-let-macro: Private macros


A.4 Data types

Jump to:   A   C   D   F   P   R   S   U  
Index Entry  Section

A
asynchronously.lisp: The cl-flow/asynchronously․lisp file
atomically.lisp: The cl-flow/atomically․lisp file

C
cl-flow: The cl-flow system
cl-flow: The cl-flow package
cl-flow.asd: The cl-flow/cl-flow․asd file
concurrently.lisp: The cl-flow/concurrently․lisp file
context.lisp: The cl-flow/context․lisp file

D
dynamically.lisp: The cl-flow/dynamically․lisp file

F
File, asynchronously.lisp: The cl-flow/asynchronously․lisp file
File, atomically.lisp: The cl-flow/atomically․lisp file
File, cl-flow.asd: The cl-flow/cl-flow․asd file
File, concurrently.lisp: The cl-flow/concurrently․lisp file
File, context.lisp: The cl-flow/context․lisp file
File, dynamically.lisp: The cl-flow/dynamically․lisp file
File, flow.lisp: The cl-flow/flow․lisp file
File, packages.lisp: The cl-flow/packages․lisp file
File, repeatedly.lisp: The cl-flow/repeatedly․lisp file
File, run.lisp: The cl-flow/run․lisp file
File, serially.lisp: The cl-flow/serially․lisp file
File, utils.lisp: The cl-flow/utils․lisp file
flow-context: Private structures
flow.lisp: The cl-flow/flow․lisp file

P
Package, cl-flow: The cl-flow package
packages.lisp: The cl-flow/packages․lisp file

R
repeatedly.lisp: The cl-flow/repeatedly․lisp file
run.lisp: The cl-flow/run․lisp file

S
serially.lisp: The cl-flow/serially․lisp file
Structure, flow-context: Private structures
System, cl-flow: The cl-flow system

U
utils.lisp: The cl-flow/utils․lisp file