any suggestions how to guard against that? thanks too
I guess I could not expose the in channel..
you should check the return value on every channel read and channel write, and have a graceful exit or recovery for nil
this also means you don't necessarily need a sentinel value for early exit - you can just document that closing the in channel means you wrap things up
nice
if you study the functions in clojure.core.async, they follow that pattern: closing a channel they use is accepted as a way to make them exit if apropriate
that's a great idea, will do
this code lives in a component, so was thinking of something to shut it down
should I do any other cleanup?
draining any values I suppose
that depends on your domain, letting the channels go out of scope should suffice to release resources