------------------------- clojure.core.async/>!! ([port val]) puts a val into port. nil values are not allowed. Will block if no buffer space is available. Returns true unless port is already closed.
(let [c (chan) ;; NO BUFFER!
d (go (<! c)) ;; park a pseudothread to read c
e (>!! c 42)] ;; blocking write to c, will unpark c's pseudothread
(println {:c-coughs-up '(this will hang (<!! c)),
:d-coughs-up (<!! d),
:what's-e e})
(close! c) (close! d))
{:c-coughs-up (this will hang (<!! c)), :d-coughs-up 42, :what's-e true}
>!!
will block if there is no buffer space available and if there is no rendezvous available, that is, no pseudothread parked waiting for <!
.