Author vstinner
Recipients vstinner
Date 2018-12-13.00:36:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za>
In-reply-to
Content
The join() method of multiprocessing.Pool calls self._worker_handler.join(): it's a thread running _handle_workers(). The core of this thread function is:

        while thread._state == RUN or (pool._cache and thread._state != TERMINATE):
            pool._maintain_pool()
            time.sleep(0.1)

I understand that the delay of 100 ms is used to check regularly the stop condition changed. This sleep causes a mandatory delay of 100 ms on Pool.join().
History
Date User Action Args
2018-12-13 00:36:54vstinnersetrecipients: + vstinner
2018-12-13 00:36:54vstinnersetmessageid: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za>
2018-12-13 00:36:54vstinnerlinkissue35479 messages
2018-12-13 00:36:54vstinnercreate