(getPhase this)(runSub this task-state)(subscribe-callback task phase f)Attach a subscription to task, running f when reaching phase
f receives the current state of this as its only argument.
Attach a subscription to `task`, running `f` when reaching `phase` `f` receives the current state of `this` as its only argument.
(subscribe-cancel-exec task phase fut-or-fn)Attach a subscription to task, cancelling execution when reaching phase.
In CLJ: fut-or-fn is a Future, cancelled via Future/.cancel
In CLJS: fut-or-fn is a cancellation function that is called directly
Only runs if the task was cancelled (checks TaskState.cancelled).
Attach a subscription to `task`, cancelling execution when reaching `phase`. In CLJ: `fut-or-fn` is a Future, cancelled via Future/.cancel In CLJS: `fut-or-fn` is a cancellation function that is called directly Only runs if the task was cancelled (checks TaskState.cancelled).
(subscribe-teardown task target)Attach a subscription to task task, tearing down task target when reaching phase-settling.
If target reaches phase-settling before task, remove the subscription from task.
Attach a subscription to task `task`, tearing down task `target` when reaching `phase-settling`. If `target` reaches `phase-settling` before `task`, remove the subscription from `task`.
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 |