Utility functions.
Utility functions.
(backoff-seq max)
Returns an infinite seq of exponential back-off timeouts with random jitter.
Returns an infinite seq of exponential back-off timeouts with random jitter.
(deadline-batching chan max deadline-fn)
Batches messages from chan and emits the most recently accumulated batch whenever the max batch size is reached or one of the messages in the batch has become 'due' for action. deadline-fn is a function of a message that returns a channel that closes when the message is 'due'. deadline-fn may return nil if a message has no particular urgency.
Batches messages from chan and emits the most recently accumulated batch whenever the max batch size is reached or one of the messages in the batch has become 'due' for action. deadline-fn is a function of a message that returns a channel that closes when the message is 'due'. deadline-fn may return nil if a message has no particular urgency.
(defmulti* symbol dispatch-fn)
Like clojure.core/defmulti, but actually updates the dispatch value when you reload it.
Like clojure.core/defmulti, but actually updates the dispatch value when you reload it.
(distinct-by f)
(distinct-by f coll)
Like distinct but according to a key-fn instead of the element itself.
Like distinct but according to a key-fn instead of the element itself.
(interval-batching chan msecs)
(interval-batching chan msecs max)
Partitions the original chan by non-empty time intervals.
Partitions the original chan by non-empty time intervals.
(on-chan-close chan & body)
Execute body when the channel is closed. This is immediate upon channel closing and occurs on the same thread that closed chan.
Execute body when the channel is closed. This is immediate upon channel closing and occurs on the same thread that closed chan.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close