(as-chan t)Convert a task to a core.async channel.
Returns a channel that receives the task's result when it settles. If the task fails, the exception is thrown when taking from the channel. Note: nil results throw IllegalArgumentException (can't put nil on channel).
Convert a task to a core.async channel. Returns a channel that receives the task's result when it settles. If the task fails, the exception is thrown when taking from the channel. Note: nil results throw IllegalArgumentException (can't put nil on channel).
(get-state-exceptional state)Check if a TaskState represents an exceptional (failed) completion.
Returns truthy if the task failed with an exception, falsy if it completed
successfully. When truthy, the result from get-state-result is the exception.
Check if a TaskState represents an exceptional (failed) completion. Returns truthy if the task failed with an exception, falsy if it completed successfully. When truthy, the result from `get-state-result` is the exception.
(get-state-result state)Extract the result value from a TaskState.
Returns the stored result, which may be either the successful return value
or an exception object (check with get-state-exceptional).
Extract the result value from a TaskState. Returns the stored result, which may be either the successful return value or an exception object (check with `get-state-exceptional`).
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 |