On Thursday, June 11, 2020 at 6:20:19 AM UTC+2, Sean Corfield wrote: > > If you provide an error handler on the agent -- or just specify the error > mode as :continue -- it does not hang. >
Thanks for pointing out those solutions. > That makes me think that what you're seeing is "expected behavior" > although it does seem a bit strange...? > Yes, `await` doc says: "Will block on failed agents". We should infer that we should only use `await` when we ensure that the agent continues on exceptions. Looking into the implementation of `await`, it creates a latch, sends a `latch.countDown()` action to the agent, and awaits that latch. It makes sense that it blocks forever if the agent stops processing actions. However, there's a thing I don't understand. `await` doc says: "Blocks the current thread (indefinitely!) until all actions dispatched thus far, *from this thread or agent*, to the agent(s) have occurred." But, considering its implementation, we seem to be waiting for *all *actions to occur, not only the actions dispatched by this thread. Also, we are not allowed to call `await` from inside an agent action; why does it say "from this thread or agent" then? Am I misinterpreting something? Thanks, Ernesto -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/58129eee-b0d9-4fef-8ee4-363249e75c04o%40googlegroups.com.