I was doing some work that involved the use of thread locals, and I noticed
that within a REPL session (launched via 'lein repl') my thread locals
would reset themselves to their initial value. I did some digging and found
that the thread id keeps changing within a single REPL session, e.g.:

user=> (.getId (Thread/currentThread))
65
user=> (.getId (Thread/currentThread))
74
user=> (.getId (Thread/currentThread))
78
user=> (.getId (Thread/currentThread))
78
user=> (.getId (Thread/currentThread))
78
user=> (.getId (Thread/currentThread))
82

I'm hoping someone who knows the internals of the REPL could shed some
light onto why this is the behavior and why it was designed this way.

Thanks,
Nathan

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to