Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def a (ref 1))
- (def b (ref 1))
- (future (#(dosync (println "a " @a) (Thread/sleep 1000) (println "b " @b))))
- (dosync (alter b inc))
- => #'com.xmltravel.elasticbookings.mqtest/a
- => #'com.xmltravel.elasticbookings.mqtest/b
- => #object[clojure.core$future_call$reify__6736 0x5fd016bb {:status :pending, :val nil}]
- a 1
- => 2
- a 1
- b 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement