> Having a way to clear the queue and then shutdown once existing jobs are done > is a lot > more manageable. ... > So the only clean way to do this is cooperative: flush the queue, send some > kind of > message to all children telling them to finish as quickly as possible, then > wait for them > to finish.
I was personally thinking of an implementation like that, cancel all still in pending and if wait is true the wait for the ones running, for both implementations. I didn't actually meant terminate literally, I just called it that as that's what multiprocessing.dummy.Pool.terminate (+ join after) does. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/M62FHIZGAPCUSULLVV63NEWKQ2HWH6OY/ Code of Conduct: http://python.org/psf/codeofconduct/