(alts! chans)
Returns a c/promise
that will resolve to [ch x],
where ch is the first chan out of chans to give a value,
and x is the value received from ch.
Returns a `c/promise` that will resolve to [ch x], where ch is the first chan out of chans to give a value, and x is the value received from ch.
(chan)
(chan capacity)
Returns a channel with the given capacity (or 1).
Returns a channel with the given capacity (or 1).
(put! ch x)
Returns a c/promise
that will resolve to
true once x has been put on ch.
Returns a `c/promise` that will resolve to true once x has been put on ch.
(take! ch)
Returns a c/promise
that will be completed
with the value received from ch.
Returns a `c/promise` that will be completed with the value received from ch.
(timeout timeout-ms)
(timeout timeout-ms timeout-val)
Returns a chan
that will eventually have
timeout-val (or ::timeout
) after timeout-ms.
Returns a `chan` that will eventually have timeout-val (or `::timeout`) after timeout-ms.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close