store/[org.clojure/clojure "1.8.0"] clj::clojure.core/future-done?

Official Documentation

Add notes
Arities
==================================================
   [f]

Docstring
==================================================
  Returns true if future f is done

Source

(defn future-done?
  "Returns true if future f is done"
  {:added "1.1"
   :static true}
  [^java.util.concurrent.Future f] (.isDone f))

Example 1

Edit
;; beware of cancellation !!!

(def f (future (Thread/sleep 5000) (inc 0)))
;; => #'user/f

(future-cancel f)                           
;; => true

(future-cancelled? f)                       
;; => true

(future-done? f)                            
;; => true

@f                                          
;; => java.util.concurrent.CancellationException (NO_SOURCE_FILE:0)

Example 2

Edit
(def f (future (Thread/sleep 5000) (inc 0)))
;; => #'user/f

(future-done? f)                            
;; => false

(Thread/sleep 5000)
;; => nil

(future-done? f)
;; => true

Uses on crossclj