Liking cljdoc? Tell your friends :D

hive-weave.async

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.
raw docstring

bound-gocljmacrodeprecated

(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.
sourceraw docstring

bound-go-loopcljmacrodeprecated

(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.
sourceraw docstring

default-labelclj

Label carried by a go block the caller did not name.

Label carried by a go block the caller did not name.
sourceraw docstring

ex-payloadclj

(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.
sourceraw docstring

exception-errorclj

(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`).
sourceraw docstring

normalize-optsclj

(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.
sourceraw docstring

safe-gocljmacro

(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.
sourceraw docstring

safe-go-loopcljmacro

(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.
sourceraw docstring

timeout-errorclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close