Fiber abstraction, supervisor tree, and concurrent execution runners for fx.
Fiber abstraction, supervisor tree, and concurrent execution runners for fx.
(add-finalizer! fiber finalizer)Registers a cleanup finalizer thunk or effect to be executed when the fiber completes or is interrupted.
Registers a cleanup finalizer thunk or effect to be executed when the fiber completes or is interrupted.
(add-interrupt-handler! fiber handler-fn)Registers a callback to be invoked immediately when the fiber is interrupted.
Registers a callback to be invoked immediately when the fiber is interrupted.
(interrupt-fiber! fiber)(interrupt-fiber! fiber reason)Atomically interrupts fiber and cascades cancellation to all active child fibers.
Atomically interrupts `fiber` and cascades cancellation to all active child fibers.
(join-fiber! fiber)(join-fiber! fiber timeout-ms timeout-val)Awaits completion of fiber and returns its outcome (or propagates failure / throws).
Awaits completion of `fiber` and returns its outcome (or propagates failure / throws).
(make-fiber)(make-fiber parent-fiber)Constructs a new unstarted or initial Fiber instance.
Constructs a new unstarted or initial Fiber instance.
(register-child! parent-fiber child-fiber)Registers child-fiber into parent-fiber's children supervisor set.
Registers `child-fiber` into `parent-fiber`'s children supervisor set.
(run-async-chan! effect)(run-async-chan! effect context)Executes effect in a background fiber and puts the final outcome onto a core.async channel.
Closes the channel upon completion. Returns the output channel.
Executes `effect` in a background fiber and puts the final outcome onto a core.async channel. Closes the channel upon completion. Returns the output channel.
(run-fiber! effect)(run-fiber! effect context)Executes effect asynchronously in a dedicated lightweight Fiber, returning the IFiber instance.
Binds :fiber in the evaluation context and coordinates parent-child supervisor hierarchy.
Executes `effect` asynchronously in a dedicated lightweight Fiber, returning the `IFiber` instance. Binds `:fiber` in the evaluation context and coordinates parent-child supervisor hierarchy.
(unregister-child! parent-fiber child-fiber)Removes child-fiber from parent-fiber's children supervisor set.
Removes `child-fiber` from `parent-fiber`'s children supervisor set.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |