Task implementation: state machine, executors, and the Task type.
Tasks progress through phases gated by CAS transitions on a MachineLatch.
See state-machine for the lifecycle definition and Task for coordination details.
Task implementation: state machine, executors, and the Task type. Tasks progress through phases gated by CAS transitions on a MachineLatch. See `state-machine` for the lifecycle definition and `Task` for coordination details.
The currently executing task, used for parent-child registration.
The currently executing task, used for parent-child registration.
(-do-run t f)(-pending-task delegator)(-pending-task delegator compelled)Create a new Task in pending state. The latch is used as the initial sentinel value in the state AtomicReference, allowing CAS to detect first write.
Create a new Task in pending state. The latch is used as the initial sentinel value in the state AtomicReference, allowing CAS to detect first write.
(cancelled? t)True if the given task is cancelled.
True if the given task is cancelled.
(do-applier delegator v)(do-applier delegator v e)(do-applier delegator v e tf)Create a task that grounds a value (and optionally transforms it).
Unlike -live-task which runs a function, this applies a value directly.
The value is grounded (nested tasks resolved in parallel), then optionally
transformed by tf. Used by coordination functions like then, qmerge,
and qdo to await multiple values and apply a combining function.
Arities:
[delegator v] - Ground v, no transform
[delegator v e] - If e, fail with e; otherwise ground v
[delegator v e tf] - If e, fail with e; otherwise ground v then apply tf
Create a task that grounds a value (and optionally transforms it). Unlike `-live-task` which runs a function, this applies a value directly. The value is grounded (nested tasks resolved in parallel), then optionally transformed by `tf`. Used by coordination functions like `then`, `qmerge`, and `qdo` to await multiple values and apply a combining function. Arities: `[delegator v]` - Ground v, no transform `[delegator v e]` - If e, fail with e; otherwise ground v `[delegator v e tf]` - If e, fail with e; otherwise ground v then apply tf
(do-runner delegator & body)(interrupted?)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 |