core.async go blocks whose failure is a VALUE.
safe-go / safe-go-loop return a channel yielding a hive-dsl Result:
{:ok v} {:error :weave/exception :name label :message .. :class ..} {:error :weave/timeout :name label :timeout-ms ms}
Park ops (<!, >!, alts!) work normally inside the body. There is no
safe-go-call counterpart to hive-weave.safe/safe-future-call: the body
must stay lexically inside a/go.
bound-go / bound-go-loop are DEPRECATED since 0.3.0.
core.async go blocks whose failure is a VALUE.
`safe-go` / `safe-go-loop` return a channel yielding a hive-dsl Result:
{:ok v}
{:error :weave/exception :name label :message .. :class ..}
{:error :weave/timeout :name label :timeout-ms ms}
Park ops (`<!`, `>!`, `alts!`) work normally inside the body. There is no
`safe-go-call` counterpart to `hive-weave.safe/safe-future-call`: the body
must stay lexically inside `a/go`.
`bound-go` / `bound-go-loop` are DEPRECATED since 0.3.0.(bound-go & body)DEPRECATED since 0.3.0 — prefer clojure.core.async/go, or safe-go for
failures as values. Retained as the IBindingConveyor swap point.
Installs the caller's binding frame by value inside the go block and restores the executing thread's prior frame on exit.
DEPRECATED since 0.3.0 — prefer `clojure.core.async/go`, or `safe-go` for failures as values. Retained as the `IBindingConveyor` swap point. Installs the caller's binding frame by value inside the go block and restores the executing thread's prior frame on exit.
(bound-go-loop bindings & body)DEPRECATED — see bound-go. Prefer clojure.core.async/go-loop, or
safe-go-loop when you want failures as values.
DEPRECATED — see `bound-go`. Prefer `clojure.core.async/go-loop`, or `safe-go-loop` when you want failures as values.
Label carried by a go block the caller did not name.
Label carried by a go block the caller did not name.
(ex-payload t)Reduce a Throwable to the host-neutral shape exception-error takes.
Reduce a Throwable to the host-neutral shape `exception-error` takes.
(exception-error label {:keys [message class]})Result for a go block whose body threw. Takes the Throwable already reduced
to data (see ex-payload).
Result for a go block whose body threw. Takes the Throwable already reduced to data (see `ex-payload`).
(normalize-opts opts)Apply defaults to caller-supplied GoOpts. A nil :timeout-ms is preserved: an untimed block is a choice, not a missing value.
Apply defaults to caller-supplied GoOpts. A nil :timeout-ms is preserved: an untimed block is a choice, not a missing value.
(safe-go opts & body)Run body in a go block; return a channel yielding a Result.
opts — {:timeout-ms pos-int (optional), :name string (optional)} A throwing body yields (err :weave/exception ..). With :timeout-ms, a body that outruns its budget yields (err :weave/timeout ..) and the inner block is abandoned, not cancelled.
Run body in a go block; return a channel yielding a Result.
opts — {:timeout-ms pos-int (optional), :name string (optional)}
A throwing body yields (err :weave/exception ..). With :timeout-ms, a body
that outruns its budget yields (err :weave/timeout ..) and the inner block
is abandoned, not cancelled.(safe-go-loop opts bindings & body)safe-go over a loop. Same Result contract; recur targets the loop.
`safe-go` over a `loop`. Same Result contract; `recur` targets the loop.
(timeout-error label timeout-ms)Result for a go block that outlived its :timeout-ms.
Result for a go block that outlived its :timeout-ms.
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 |