Liking cljdoc? Tell your friends :D
Clojure only.

co.multiply.remontoire.patterns.bounding

Deadlines. Two different waits are boundable, and they are not the same: the eval's await bounds how long the response waits before returning running — the work continues regardless, addressed by its id — where __q/timeout bounds the work itself. Reach for await when you only want your answer sooner; reach for timeout when work still running past the deadline should die.

Deadlines. Two different waits are boundable, and they are not the
same: the eval's `await` bounds how long the *response* waits before
returning `running` — the work continues regardless, addressed by its
id — where `__q/timeout` bounds the *work* itself. Reach for `await`
when you only want your answer sooner; reach for `timeout` when work
still running past the deadline should die.
raw docstring

boundedclj

(bounded task ms fallback)

task, dead or done within ms: past the deadline the chain is cancel-cascaded — __q/finally cleanup still runs — and fallback is what the caller gets. The deadline speaks only when the task has said nothing: a task that settles first prevails whatever the duration, and a failing task throws its own exception promptly rather than hiding behind fallback until the deadline — absorbing failures too takes an explicit __q/catch composed on top.

`task`, dead or done within `ms`: past the deadline the chain is
cancel-cascaded — `__q/finally` cleanup still runs — and `fallback` is
what the caller gets. The deadline speaks only when the task has said
nothing: a task that settles first prevails whatever the duration,
and a *failing* task throws its own exception promptly rather than
hiding behind `fallback` until the deadline — absorbing failures too
takes an explicit `__q/catch` composed on top.
raw 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