3 ms·
This is an attempt to implement supervisor trees in go as a library: https://github.com/polydawn/go-sup https://github.com/polydawn/go-sup (Hej; author.) It ta
by heavenlyhash 10y ago
This is an attempt to implement supervisor trees in go as a library: https://github.com/polydawn/go-sup https://github.com/polydawn/go-sup (Hej; author.)
It takes the Wait-for-children behavior path by default, and that seems much safer to me. The downside is, as we're describing: if you do get stuck in IO somewhere, you're a pretty unhappy camper. This library makes the choice of (by default; it's a handler func you can override) logging warnings to stderr if a task doesn't exit within 2 seconds of being told to quit... but this still feels like something of a hack; more of a debug measure than a concrete way to improve system stability. Better ideas would be highly welcome!
- lobster_johnson 10y agoThat looks very promising, actually, thanks. I'm defininitely going to try it out the next time I have a problem involving a graph of workers.