Takes a val from port if it's possible to do so immediately. Never blocks. Returns value if successful, nil otherwise.
(let [c (chan)] (println (poll! c))) ;; nil ;;=> nil (it does not block even though there is no buffer!) (let [c (chan 1)] (println (offer! c 10)) (println (poll! c))) ;; true ;; 10 ;;=> nil
Puts a val into port if it's possible to do so immediately. nil values are not allowed. Never blo...
poll!