alitto / pond

🔘 Minimalistic and High-performance goroutine worker pool written in Go
MIT License
1.45k stars 64 forks source link

Any way to pause it? #10

Closed Numenorean closed 3 years ago

Numenorean commented 3 years ago

I need to pause workerpool without waiting tasks finishing and afterwards resume execution from the same place. Is it possible?

alitto commented 3 years ago

Hey @Numenorean! It's currently not possible to pause the worker pool, only "stop" is supported. Given tasks are submitted to the pool as anonymous functions, we don't really have a way to "suspend" its execution, unless the function itself listens to a channel and you can send a message there to signal that (but this would be transparent to the worker pool).

alitto commented 3 years ago

Closing due to inactivity