Closed skaldesh closed 3 months ago
Good idea. But what if the closer is created via a OneWay/TwoWayCloser call? Maybe we should also add a second helper:
cl.CloseOnContextDone
True, did not consider One/Twoway stuff...
yep, connecting an existing closer to a given context is the correct solution, I guess.
I had the following use case today:
Instead of having to manually connect a given Context with a new closer, how about we add a new constructor
closer.NewWithCtx(context.Context)
that creates a closer and starts this goroutine internally?