Hi, On Oct 26, 3:58 am, samppi <[email protected]> wrote:
> I've read many, many times that binding allows you to give to vars > "thread-specific values", and that vars have a "thread-global value" > too. I think that I understand how vars and binding work, but I don't > understand how binding is necessarily related to threads. To me, a > binding just creates a self-contained context in which the var refers > to another value, and that outside any binding context, a var can have > a default value. What do threads have to do with bindings? How would > they interact? The self-contained context is basically the stack. You push bindings, call functions and when the you return to the pushing functions the bindings are popped again. But a new thread has a different stack. Hence you have to set up any required bindings on the new stack also. Currently this has to be done manually, but there will be a bound-fn macro to support with this in the future. Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
