-
Couldn't load subscription status.
- Fork 262
Closed
Labels
Description
internal_worker.AggregatedWorker#Run calls aw.Start, which asserts that the worker has not yet been stopped.
Run is a blocking function, it must be executed in a goroutine if the user wants to stop the worker independently. The user may then wait for an input signal and Stop the worker. It is possible that Run has not yet started and Stop executes before Run. In this tight sequence of events, the code will panic:
sdk-go/internal/internal_worker.go
Line 955 in dea0cfa
| panic("attempted to start a worker that has been stopped before") |
Since Run returns an error, I'd expect this code to just return ErrClosed or something similar.