3 ms·
I was just trying to convey an example. I usually "signal" that the parent wants to stop this "actor" for some reason (e.g graceful shutdown). If parent need a
by sly010 10y ago
I was just trying to convey an example. I usually "signal" that the parent wants to stop this "actor" for some reason (e.g graceful shutdown).
If parent need a "done" channel, it passes it in and "actor" closes it on its way out.
Cleanup usually "signals" children and waits for them to be "done".
Sometimes "done" is just signalled by the goroutine returning and it is wrapped in parent somehow.
But every time I try to formalize it into some "framework" my abstraction fails.