Is there a way to set a watch on a future so that it triggers a callback when it is done?
something like this?
> (def a (future (Thread/sleep 1000) \"
Instead of adding additional time with Thread/Sleep , I'm leveraging on the fact that @future-ref for any reference to the future will wait until the future is done.
Thread/Sleep
@future-ref
(defn wait-for [futures-to-complete] (every? #(@%) futures-to-complete))