[New-bugs-announce] [issue13106] Incorrect pool.py distributed with Python 2.7 windows 32bit

Aaron Staley report at bugs.python.org
Wed Oct 5 04:11:49 CEST 2011


New submission from Aaron Staley <usaar33 at gmail.com>:

The multiprocess/pool.py distributed with the Python 2.7.2 Windows Installer is different from the one distributed with the 64 bit windows installer or source tarball - and is buggy.

Specifically, see Pool._terminate_pool:


    def _terminate_pool(cls, taskqueue, inqueue, outqueue, pool,
                        worker_handler, task_handler, result_handler, cache):
        # this is guaranteed to only be called once
        debug('finalizing pool')

        worker_handler._state = TERMINATE
        task_handler._state = TERMINATE
        taskqueue.put(None)                 # THIS LINE MISSING!


Without that line, termination may deadlock during Pool._help_stuff_finish.  The consequence to the user is the interpreter not shutting down.

----------
components: Windows
messages: 144934
nosy: Aaron.Staley
priority: normal
severity: normal
status: open
title: Incorrect pool.py distributed with Python 2.7 windows 32bit
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13106>
_______________________________________


More information about the New-bugs-announce mailing list