[New-bugs-announce] [issue35479] multiprocessing.Pool.join() always takes at least 100 ms

STINNER Victor report at bugs.python.org
Wed Dec 12 19:36:54 EST 2018


New submission from STINNER Victor <vstinner at redhat.com>:

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().

----------
components: Library (Lib)
messages: 331726
nosy: vstinner
priority: normal
severity: normal
status: open
title: multiprocessing.Pool.join() always takes at least 100 ms
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35479>
_______________________________________


More information about the New-bugs-announce mailing list