This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-01
Channels
- # announcements (7)
- # babashka (72)
- # beginners (62)
- # biff (1)
- # calva (9)
- # cider (8)
- # clj-kondo (35)
- # clj-otel (8)
- # cljsrn (11)
- # clojure (98)
- # clojure-europe (25)
- # clojure-germany (1)
- # clojure-norway (9)
- # clojure-uk (2)
- # clojured (3)
- # clojurescript (12)
- # conjure (3)
- # core-logic (4)
- # cursive (18)
- # datalevin (9)
- # datomic (5)
- # defnpodcast (2)
- # exercism (1)
- # graalvm (5)
- # gratitude (6)
- # hyperfiddle (3)
- # interop (12)
- # jobs (1)
- # joyride (34)
- # lsp (22)
- # meander (14)
- # missionary (16)
- # nbb (88)
- # off-topic (4)
- # pathom (20)
- # podcasts-discuss (1)
- # polylith (13)
- # portal (10)
- # re-frame (6)
- # releases (2)
- # remote-jobs (2)
- # rewrite-clj (3)
- # shadow-cljs (3)
- # spacemacs (6)
- # vim (24)
Does anyone have recommendations for concurrent queue data structures that allow you to remove the tail iff it's equal to some object? Basically allowing you to CAS the tail?
I've been working with the ConcurrentLinkedQueue from the java collections framework, and it kinda works, but the remove
method on it doesn't quite match the semantics I want.
I don't have an answer for you but this mailing list is a place where people discuss such things: http://cs.oswego.edu/pipermail/concurrency-interest/
Thanks
Yeah, although I'm trying to not reimplement a concurrent queue in clojure with atoms
no, I just need to be able to do atomic removal of elements after I inspect them
then honestly I'd look at putting a PersistentQueue in an atom, and using cas, not swap
That might be feasible, the main reason I hadn't looked too hard at this is I'm expecting high contention on this queue and so I was looking to j.u.concurrent for mutable implementations to help mitigate that cost.
yes, that was the problem