I'm a total noob to Clojure, but my understanding is that Vars
initially have "root" bindings shared by all threads. I think binding
changes a Var so that instead of having a root binding shared by all
threads it now has thread-local binding; changes made to the thread-
local value bound to Var are isolated from other threads. I think
that's the purpose: isolating threads from seeing each others changes.

On Oct 25, 10:58 pm, samppi <[email protected]> wrote:
> Here's something that I've been confused about for a long time:
>
> 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?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to