This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-13
Channels
- # adventofcode (37)
- # announcements (11)
- # babashka (46)
- # beginners (35)
- # biff (1)
- # clojure (44)
- # clojure-austin (1)
- # clojure-europe (23)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-uk (5)
- # conjure (3)
- # cursive (22)
- # data-science (13)
- # docker (11)
- # events (8)
- # hyperfiddle (7)
- # joyride (1)
- # juxt (9)
- # malli (7)
- # matrix (4)
- # pedestal (3)
- # podcasts-discuss (1)
- # portal (1)
- # re-frame (62)
- # reitit (2)
- # releases (1)
- # schema (3)
- # sql (14)
- # squint (3)
- # xtdb (6)
- # yamlscript (4)
What would be the best way to do an offload where I don’t want the resulting thread to be cancelled on unmount? Concretely a DB transaction where I want to await the result, but not cancel it if the user navigates away or whatever.
you could run it somewhere higher up the supervision tree, outside the dom layer. There's also https://cljdoc.org/d/missionary/missionary/b.33/api/missionary.core#compel as a final cop-out
I want this to be true if the page is closed as well, so let’s assume that the entire tree is going to disappear. I guess compel
it is, or I could fork another thread inside of offload
, I guess. We use virtual threads, so the overhead is minimal.
I’m getting this on release compilation (not dev), using the latest Clojars release. I’m not sure how to approach this, please advice.