These would be consistent with having a background thread pool where the ttl expired that were running your repl commands. I was able to repro in lein after waiting a bit.
The default clojure.main/repl doesn't do anything like that, but maybe lein and boot do (perhaps via nrepl or something?) On Tuesday, February 9, 2016 at 12:55:13 PM UTC-6, Magomimmo wrote: > > yep..now I get the same weird result with boot too: > > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 64 > boot.user=> (.getId (Thread/currentThread)) > 64 > > mimmo > > On 09 Feb 2016, at 19:48, Nathan Marz <nat...@nathanmarz.com> wrote: > > I should clarify that the thread id doesn't change instantly, it seems to > change when I've left it idle for a bit. Also on lein 2.5.2. > > On Tue, Feb 9, 2016 at 1:45 PM, Mimmo Cosenza <mimmo.cose...@gmail.com> > wrote: > >> I just tried with boot real: >> >> boot.user=> (.getId (Thread/currentThread)) >> 34 >> boot.user=> (.getId (Thread/currentThread)) >> 34 >> boot.user=> (.getId (Thread/currentThread)) >> 34 >> boot.user=> (.getId (Thread/currentThread)) >> 34 >> boot.user=> (.getId (Thread/currentThread)) >> 34 >> boot.user=> (.getId (Thread/currentThread)) >> 34 >> >> >> mimmo >> >> On 09 Feb 2016, at 19:38, Alex Miller <a...@puredanger.com> wrote: >> >> That seems pretty weird. I can't reproduce it. I'm using lein 2.5.2. >> >> On Tuesday, February 9, 2016 at 12:19:09 PM UTC-6, Nathan Marz wrote: >>> >>> 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. >> >> >> > > > -- > Twitter: @nathanmarz > http://nathanmarz.com > > -- > 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. > > > -- 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.