Fork me on GitHub
#hyperfiddle
<
2023-12-13
>
henrik10:12:54

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.

xificurC11:12:39

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

henrik12:12:17

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.

henrik15:12:40

I’m getting this on release compilation (not dev), using the latest Clojars release. I’m not sure how to approach this, please advice.

henrik10:12:17

This is intermittent, and rerunning will occasionally make it compile without errors. We’ll try to live with it until we’re on IC.

henrik14:12:35

Yeah, could be, although we run with Xss4m