CLJ implementation of MachineLatch.
CLJ implementation of MachineLatch.
CLJS implementation of MachineLatch.
CLJS implementation of MachineLatch.
(assert-virtual! thread)Throws if current thread is a platform thread. Parking platform threads starves the compute pool.
Throws if current thread is a platform thread. Parking platform threads starves the compute pool.
(-at-or-past-idx? this target-idx)Returns true if current state index >= target-idx.
Returns true if current state index >= target-idx.
(-at-or-past? this target-state)Returns true if current state >= target-state in declared order.
Returns true if current state >= target-state in declared order.
(-await this target-state)Returns a Promise that resolves to true when state >= target-state.
Returns a Promise that resolves to true when state >= target-state.
(-await-millis this target-state timeout-ms)Returns a Promise that resolves to true when state >= target-state, or false on timeout.
Returns a Promise that resolves to true when state >= target-state, or false on timeout.
(-get-state this)Returns the current state keyword.
Returns the current state keyword.
(-transition! this action)Attempt to perform action. Returns true if succeeded, false otherwise.
Attempt to perform action. Returns true if succeeded, false otherwise.
(make-latch idx->state state->idx transition-fn)Create a new MachineLatch instance.
Create a new MachineLatch instance.
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 |