user=> (def f (future (Thread/sleep 5000) (inc 0))) #'user/f user=> (future-cancel f) true user=> (future-cancelled? f) true
user=> (def f (future (inc 0))) #'user/f user=> (future-cancel f) false user=> (future-cancelled? f) false
Takes a body of expressions and yields a future object that will in
Returns true if x is a future
Returns true if future f is cancelled
Returns true if future f is done
(defn future-cancel "Cancels the future, if possible." {:added "1.1" :static true} [^java.util.concurrent.Future f] (.cancel f true))
Comments top
No comments for future-cancel. Log in to add a comment.