This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-19
Channels
- # announcements (10)
- # babashka (40)
- # beginners (21)
- # biff (3)
- # clj-kondo (84)
- # clj-together (1)
- # clj-yaml (21)
- # clojure (53)
- # clojure-dev (10)
- # clojure-europe (26)
- # clojure-nl (3)
- # clojure-norway (29)
- # clojure-uk (6)
- # clojurescript (11)
- # community-development (2)
- # data-science (6)
- # datomic (15)
- # deps-new (4)
- # emacs (10)
- # gratitude (1)
- # helix (3)
- # hoplon (4)
- # hyperfiddle (35)
- # jobs-discuss (44)
- # lsp (31)
- # meander (14)
- # membrane (24)
- # pathom (2)
- # practicalli (1)
- # rdf (3)
- # re-frame (18)
- # releases (1)
- # shadow-cljs (28)
- # xtdb (4)
Can anyone confirm or deny a comment made by Ron on the loom-dev mailing list about Clojure considering moving away from synchronized
methods for things like LazySeq
(switching to java.util.concurrent
primitives) make it more friendly for virtual threads? I haven't seen anything anywhere mentioning it. Thishttps://clojurians.slack.com/archives/C06E3HYPR/p1677254218136409 makes it sound like it might just be a wait for them to resolve it on the JVM side (which they said likely won't be this year). Link to https://mail.openjdk.org/pipermail/loom-dev/2023-April/005486.html.
Right now there is an interaction where if you set the send-off!
executor to a virtual thread executor you can deadlock the run-time by calling nested pmap
s. I ended up running into this in real code in a project where we were using the virtual thread executor and cider-nrepl
uses haystack (error analysis library) which uses lots of nested pmaps.
Anyway, was just wondering where the mindset was on all of this. Cheers!
it's on our list to investigate but we do not yet have a plan, not sure that will get done in 1.12
it's probably beneficial to do regardless as most of the lock use is read on lazy seqs
Awesome! I searched in the repo and saw a few other places synchronized
is used as well - is the plan to potentially get rid of all uses of it?
not sure on the others. atoms rely on compareAndSet not synchronized
not sure how or whether that's affected
don't know, needs real work
Fair enough. Yes, I think Agent
restart is also synchronized, as is some stuff in AReference
and Var
. Completely agree it's non-trivial. Not sure where the Clojure team is at w/ outside contributors but I might have time to take a peak. Also completely understand that this is something so under the hood and deep that you may not want the outside help - so completely understand either way 🙏
information to inform decisions is useful :)