x/sync: add ordered shutdown package #42193
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
I built a package that allows to create groups of goroutines on program start and then shut them down in the reverse creation order, group by group. This is very handy to make sure program shuts down cleanly, waiting for all goroutines to finish.
Please have a look at the code https://github.com/ash2k/stager
I've used it in quite a few projects over the years and I thought maybe it'll be useful to the community too. I propose to include it as a package in https://github.com/golang/sync/ repository.
The text was updated successfully, but these errors were encountered: