Staging
v0.5.1
Revision a5cbab552d294d99fde864306632d7e511a75d3c authored by Thomas Moreau on 16 February 2020, 18:09:26 UTC, committed by GitHub on 16 February 2020, 18:09:26 UTC


As reported initially by @rad-pat in #6084, the following script causes a deadlock.

```
from concurrent.futures import ProcessPoolExecutor


class ObjectWithPickleError():
    """Triggers a RuntimeError when sending job to the workers"""

    def __reduce__(self):
        raise RuntimeError()


if __name__ == "__main__":
    e = ProcessPoolExecutor()
    f = e.submit(id, ObjectWithPickleError())
    e.shutdown(wait=False)
    f.result()  # Deadlock on get
```

This is caused by the fact that the main process is closing communication channels that might be necessary to the `queue_management_thread` later. To avoid this, this PR let the `queue_management_thread` manage all the closing.



https://bugs.python.org/issue39104



Automerge-Triggered-By: @pitrou
1 parent 1ed6161
History
File Mode Size
_setuptools_disclaimer.rst -rw-r--r-- 239 bytes
apiref.rst -rw-r--r-- 95.0 KB
builtdist.rst -rw-r--r-- 22.5 KB
commandref.rst -rw-r--r-- 4.5 KB
configfile.rst -rw-r--r-- 5.9 KB
examples.rst -rw-r--r-- 10.1 KB
extending.rst -rw-r--r-- 4.5 KB
index.rst -rw-r--r-- 1.2 KB
introduction.rst -rw-r--r-- 8.4 KB
packageindex.rst -rw-r--r-- 448 bytes
setupscript.rst -rw-r--r-- 30.5 KB
sourcedist.rst -rw-r--r-- 9.5 KB
uploading.rst -rw-r--r-- 226 bytes

back to top