On Sat, Jan 22, 2011 at 2:09 PM, rb <raphi...@gmail.com> wrote: > I'm not sure dataflow variables are available in clojure though, but > would be happy to stand corrected (I heard about the contrib dataflow > module, but from what I read it's more like cells updating based on > upstream cells it depends on, whereas what I mean by dataflow variable > is a variable that makes a thread wait until it gets bound if that > thread uses that variable)
There's promise and deliver: user=> (def foo (promise)) #'user/foo user=> (.start (Thread. #(do (Thread/sleep 10000) (deliver foo 42)))) nil user=> @foo <nothing happens for several seconds> 42 user=> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en