pool
pool copied to clipboard
How do I cancel / clear the pool?
What is the best way to prematurely cancel and dispose of all remaining pool tasks and cleanly close the pool without waiting for the tasks to complete?
Yes, that's what I'm missing! pool.cancel() or pool.releaseAll() that would discard all requests in the pool still waiting for a resource. This would allow to stop current action (possibly with hundreds of requests) and start a new one.
Finally I've found similar package called isolate_manager that works for me. Its restart()
is what I was looking for
@dvorapa Thanks for coming back here with a solution! Honestly surprised this is still even open 2 years later 😅
I worked around it and moved away from this package a while back so I totally forgot about it.
If someone needs this functionality, my comment could help. For both of us I think we won't go back as our workarounds work perfectly :smile: