Transition to grounding. Entry point for grounding:
Transition to grounding. Entry point for grounding: - running → grounding (after executing function) - pending → grounding (direct value via doApply)
Transition settling → quiescent. Teardown complete.
Transition settling → quiescent. Teardown complete.
Transition pending → running. Task body begins execution.
Transition pending → running. Task body begins execution.
Transition writing → settling. Run settling subscriptions.
Transition writing → settling. Run settling subscriptions.
Transition grounding → transforming. Applies transform function to grounded value.
Transition grounding → transforming. Applies transform function to grounded value.
Transition to writing. Writes final result to state. Entry from:
Transition to writing. Writes final result to state. Entry from: - pending/running (cancellation or exception) - grounding (no transform) - transforming (after transform)
Creates a MachineLatch with schema for Task lifecycle.
Begins in pending phase.
Creates a MachineLatch with schema for Task lifecycle. Begins in pending phase.
Body done, resolving nested tasks (ground)
Body done, resolving nested tasks (ground)
Lifecycle complete. Parent has done its work; children may still be settling.
Quiescent means this task's lifecycle is finished, not that the entire subtree has stopped. Registered children received cancel signals (if alive and not compelled), orphaned tasks are unknown (may be GC'd or still running).
Lifecycle complete. Parent has done its work; children may still be settling. Quiescent means this task's lifecycle is finished, not that the entire subtree has stopped. Registered children received cancel signals (if alive and not compelled), orphaned tasks are unknown (may be GC'd or still running).
Result available, running then callbacks and cascade cancel.
When a task reaches settling:
We do NOT guarantee children are quiescent - only that they've started winding down. This is intentional: strong lifecycle coupling prevents GC, risks deadlocks, and doesn't match real-world async (you can't force a thread to stop immediately).
Result available, running `then` callbacks and cascade cancel. When a task reaches settling: - Its result is available (deref returns) - Grounded children are *at least* settling (we observed their settling) - Cascade cancellation is attempted on registered children (best effort) We do NOT guarantee children are quiescent - only that they've started winding down. This is intentional: strong lifecycle coupling prevents GC, risks deadlocks, and doesn't match real-world async (you can't force a thread to stop immediately).
Applying transform function to grounded value.
Applying transform function to grounded value.
Writing final result to task state. All completion paths converge here.
Writing final result to task state. All completion paths converge here.
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 |