Advertisement
Guest User

Untitled

a guest
Sep 15th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (def a (ref 1))
  2. (def b (ref 1))
  3. (future (#(dosync (println "a " @a) (Thread/sleep 1000) (println "b " @b))))
  4. (dosync (alter b inc))
  5.  
  6.  
  7. => #'com.xmltravel.elasticbookings.mqtest/a
  8. => #'com.xmltravel.elasticbookings.mqtest/b
  9. => #object[clojure.core$future_call$reify__6736 0x5fd016bb {:status :pending, :val nil}]
  10. a  1
  11. => 2
  12. a  1
  13. b  2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement