Skip to content
Snippets Groups Projects
Commit 342e6942 authored by Simon Belak's avatar Simon Belak
Browse files

Check for cancelation

parent 2b6388f8
Branches
Tags
No related merge requests found
......@@ -7,12 +7,12 @@
(defn result!
"Blocking version of async/result."
[job-id]
(some-> #'async/running-jobs ; It might be that the job has finished and
; cleand up already, hence some->
deref ; var
deref ; atom
(get job-id)
deref) ; future
(let [f (-> #'async/running-jobs
deref ; var
deref ; atom
(get job-id))]
(when (and f (not (future-cancelled? f)))
@f))
(async/result (ComputationJob job-id)))
(def ^:dynamic *max-while-runtime*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment