Fork me on GitHub
#missionary
<
2024-03-18
>
J08:03:05

Hello! It’s recommended to call another task inside (m/via m/blk ...) like this?

(def app
  (m/sp
    (m/join vector (m/via m/blk (m/? (other-task)))
                   ...)))

leonoel13:03:45

it is suboptimal, an OS thread will be blocked waiting for other-task to finish

xificurC13:03:50

I think the question is given a task t how to offload it on a thread idiomatically

👍 1
J15:03:50

So inside (m/via m/blk) only “pure clojure” (no missionary stuff) is recommended.

leonoel16:03:57

yes, should be only for interop with blocking APIs