gammazero / workerpool

Concurrency limiting goroutine pool
MIT License
1.33k stars 138 forks source link

Add panic-safe TrySubmit and TrySubmitWait with backward compatibility. #77

Open Jagerente opened 4 months ago

Jagerente commented 4 months ago

This PR introduces new methods TrySubmit and TrySubmitWait to provide a panic-safe way to submit tasks to the worker pool, providing clear and explicit way for users to handle the stopped state of the worker pool without breaking backward compatibility by changing existing behavior in a non-obvious for users way.

Note: