Dereferencing a delivered promise will throw an
InterruptedException when the calling thread is interrupted:
(let [p (promise)]
(deliver p :value)
(assert (realized? p))
(deref p)) ;; => InterruptedException
This is unexpected, as retrieving the value of a realized promise should not block.
CompletableFuture through the Promesa library does not throw:
(require '[promesa.core :as p]) ;'
(let [p (p/deferred)]
(p/resolve! p :value)
(deref p)) ;; => ::value