clojure - How to limit write frequency to core.async channel? -
Is there an easy way to limit writing frequency in core .async channels? By now I can find two examples. One uses a sliding buffer and some settime magic so that the other can use the external atom as a counter. I hope core.async provides such functionality outside the box. Since one of the examples is old (10 months) I would like to know whether this is possibly an easy solution?
I am looking for a solution that works with Closer and Closurescript.
Provides work to implement rate controls on the closure code (including throttles on the channel or function) is.
> From readme:
(def in (chan 1)) (def slow-chan (1: throttle-chan in millisecond)); 1 msg / ms (& gt; !!: token); = & Gt; True (
Comments
Post a Comment