On Thu, Feb 13, 2025 at 6:11 PM Jason E. Aten <j.e.a...@gmail.com> wrote:
> 3) I almost always need to know when my goroutines are done, > > and to shut them all down in case of an error from one. > > > My idem package provides goroutine supervision trees > > and also shows how to integrate sync.WaitGroup-style > > task counting effectively with Go channels. Normal > > sync.WaitGroup is a hazard in production code because > > you cannot abort a Wait in case of error or shutdown. > > > https://github.com/glycerine/idem Hey Jason! Maybe this one can be interesting for you: https://pkg.go.dev/github.com/lightningnetwork/lnd/fn/v2#GoroutineManager It is based on a mutex and a WaitGroup and utilizes context.Context. -- Best regards, Boris Nagaev -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAFC_Vt5NA_sm-REGpCHxgQjJLjgzTEAENfomwFi%2BpNKZx9q9Dg%40mail.gmail.com.