Taken from here, recording so I don't lose it:
(defn new-q [] (java.util.concurrent.LinkedBlockingDeque.))
(defn offer!
"adds x to the back of queue q"
[q x] (.offer q x) q)
(defn take!
"takes from the front of queue q. blocks if q is empty"
[q] (.take q))
(def example-queue (new-q))
;; background thread, blocks waiting for something to print
(future (println ">> " (take! example-queue)))
;; the future-d thread will be unblocked and ">> HELLO WORLD" is printed.
(offer! example-queue "HELLO WORLD")