This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-17
Channels
- # announcements (3)
- # babashka (41)
- # beginners (118)
- # calva (4)
- # cider (22)
- # clj-kondo (4)
- # clj-on-windows (1)
- # clj-together (1)
- # clojure (164)
- # clojure-europe (46)
- # clojure-filipino (1)
- # clojure-indonesia (1)
- # clojure-my (1)
- # clojure-nl (3)
- # clojure-sg (1)
- # clojure-spec (13)
- # clojure-uk (16)
- # clojurescript (18)
- # cloverage (3)
- # conjure (5)
- # core-async (8)
- # cursive (21)
- # datomic (4)
- # deps-new (15)
- # emacs (12)
- # expound (4)
- # fulcro (45)
- # graalvm (32)
- # jobs (1)
- # malli (5)
- # nextjournal (63)
- # off-topic (27)
- # other-languages (3)
- # pathom (27)
- # proletarian (1)
- # rdf (24)
- # re-frame (10)
- # reagent (9)
- # releases (2)
- # shadow-cljs (72)
- # spacemacs (4)
- # timbre (4)
- # tools-deps (29)
- # xtdb (4)
The docstring for <!!
says "Not intended for use in direct or transitive calls from (go ...) blocks", but what can I expect to go wrong if I do use it there?
you can block your entire go pool and deadlock your app
the go pool is a fixed size thread pool and only expects to be parked by the go, not blocked by other calls. <!! (and other !!) calls can block, ergo that's usually bad, and often only bad like a year after you put it into production. that said, there might be circumstances where you know more (like the chan is a sliding/dropping buffer so never blocks, or whatever)
@winsome you can add -Dclojure.core.async.go-checking=true
to your "JVM properties" to help you to avoid <!! calls inside go blocks
(but note that won't protect you from other blocking calls)