missionary

J 2025-02-04T16:29:33.266749Z

Hi guys! In m/join , can the function have little side effect (like swap! an atom). For example:

(m/join
  (fn [a b c]
    (swap! ... a b c)
    {:a a :b b :c c})
  ...)

leonoel 2025-02-04T16:31:16.747669Z

yes, as long as it returns quickly

👍 1
2025-02-07T18:40:26.111589Z

I've been wondering about this, also in the docs it mentions being quick. But what are the implications of not being quick?

leonoel 2025-02-07T19:03:32.238339Z

it will block the progression of everything that depends on this event

2025-02-07T19:04:35.987309Z

Thank you, that’s good to know and makes sense.

leonoel 2025-02-07T19:13:36.895669Z

the function may be called from a thread that's not supposed to perform blocking IO, like an event handler or a cpu-bound pool