Having a buffered chan
, say
(def c (clojure.core.async/chan 100))
is it possible to query how many elements are currently inside the chan?
Having a buffered chan
, say
(def c (clojure.core.async/chan 100))
is it possible to query how many elements are currently inside the chan?
The instantiated channel is from
ManyToManyChannel
type, you can access the internal buffer for the channel using thebuf
property.That buffer implements
clojure.lang.Counted
so it's countable.