2010/1/24 CuppoJava <patrickli_2...@hotmail.com>: > That makes sense Jarkko, thanks for the explanation. > > So then, for my example, using a binding and set! would be the proper > way of going about it right? Because I don't intend for multiple > threads to access the job queue. > > And is there a way to change the bound value for another thread? > > The reason I ask this is that for all intents and purposes the final > application will be single-threaded and thus binding/set! would be the > proper choice. However, during development, it's useful to be able to > change the value of the bindings from the REPL which runs in a > separate thread from the application.
I've found it harder to think correctly about thread-bound vars, since they are both constrained by thread boundaries and also call stack boundaries. I guess if I were you I would just use an atom. My 0.02€, -- Laurent -- 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