Home

missionary.core/?

Usage

The asynchronous parking synchronizer. A task process is spawned and its result is returned when it completes. If the process crashes, the error is rethrown.

Example : synchronize on task completion

(require '[missionary.core :as m])

(m/? (m/sleep 1000 :foo))
:= :foo

Example : recover from task failure

(require '[missionary.core :as m])
(import 'java.io.IOException)

(try (m/? (m/via m/blk (slurp "https://clojur.org")))
     (catch IOException _
       :io-failure))
:= :io-failure

Synchronicity

See also