3 ms·
Is signals your "done" channel?
by bmurphy1976 10y ago
Is signals your "done" channel?
- sly010 10y agoI 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.