pool icon indicating copy to clipboard operation
pool copied to clipboard

How do I cancel / clear the pool?

Open point-source opened this issue 4 years ago • 4 comments

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?

point-source avatar Feb 19 '21 20:02 point-source

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.

dvorapa avatar Oct 15 '22 19:10 dvorapa

Finally I've found similar package called isolate_manager that works for me. Its restart() is what I was looking for

dvorapa avatar Oct 16 '22 20:10 dvorapa

@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.

point-source avatar Oct 16 '22 20:10 point-source

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:

dvorapa avatar Oct 16 '22 20:10 dvorapa