Utility functions.
Utility functions.
(backoff-seq)
(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)
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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close