hcat
hcat copied to clipboard
Stop() -> context.Cancel
Consider the API change to remove all the Stop() methods and replace them with a passed in Context that is cancelled. This seems like it would be a cleaner API and fits with more modern/common Go practices that would be good to emulate.
Consider using https://pkg.go.dev/golang.org/x/sync/errgroup along with Run(ctx) to wait for all of them to shutdown. The Group.Go method will generally call the Run(ctx) .