(deftype PromiseBuffer [^:unsynchronized-mutable val]
impl/UnblockingBuffer
impl/Buffer
(full? [_]
false)
(remove! [_]
val)
(add!* [this itm]
(when (undelivered? val)
(set! val itm))
this)
(close-buf! [_]
(when (undelivered? val)
(set! val nil)))
clojure.lang.Counted
(count [_]
(if (undelivered? val) 0 1)))