<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/concurrent, branch print-statement</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-40443: Remove unused imports in the stdlib (GH-19803)</title>
<updated>2020-04-30T09:26:33+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-30T09:26:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=90549676e063c2c818cfc14213d3adb7edcc2bd5'/>
<id>90549676e063c2c818cfc14213d3adb7edcc2bd5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39995: Fix concurrent.futures _ThreadWakeup (GH-19760)</title>
<updated>2020-04-29T01:32:06+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-29T01:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a4dfe8ede5a37576e17035dccfe109ba7752237e'/>
<id>a4dfe8ede5a37576e17035dccfe109ba7752237e</id>
<content type='text'>
Fix a race condition in concurrent.futures._ThreadWakeup: access to
_ThreadWakeup is now protected with the shutdown lock.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a race condition in concurrent.futures._ThreadWakeup: access to
_ThreadWakeup is now protected with the shutdown lock.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-30966: concurrent.futures.Process.shutdown() closes queue (GH-19738)</title>
<updated>2020-04-27T18:53:37+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-27T18:53:37+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1a275013d1ecc2e3778d64fda86174b2f13d6969'/>
<id>1a275013d1ecc2e3778d64fda86174b2f13d6969</id>
<content type='text'>
Process.shutdown(wait=True) of concurrent.futures now closes
explicitly the result queue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Process.shutdown(wait=True) of concurrent.futures now closes
explicitly the result queue.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39207: Spawn workers on demand in ProcessPoolExecutor (GH-19453)</title>
<updated>2020-04-19T14:00:59+00:00</updated>
<author>
<name>Kyle Stanley</name>
<email>aeros167@gmail.com</email>
</author>
<published>2020-04-19T14:00:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1ac6e379297cc1cf8acf6c1b011fccc7b3da2cbe'/>
<id>1ac6e379297cc1cf8acf6c1b011fccc7b3da2cbe</id>
<content type='text'>
Roughly based on https://github.com/python/cpython/commit/904e34d4e6b6007986dcc585d5c553ee8ae06f95, but with a few substantial differences.

/cc @pitrou @brianquinlan</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Roughly based on https://github.com/python/cpython/commit/904e34d4e6b6007986dcc585d5c553ee8ae06f95, but with a few substantial differences.

/cc @pitrou @brianquinlan</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39481: PEP 585 for a variety of modules (GH-19423)</title>
<updated>2020-04-10T14:46:36+00:00</updated>
<author>
<name>Batuhan Taşkaya</name>
<email>batuhanosmantaskaya@gmail.com</email>
</author>
<published>2020-04-10T14:46:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0361556537686f857f1025ead75e6af4ca7cc94a'/>
<id>0361556537686f857f1025ead75e6af4ca7cc94a</id>
<content type='text'>
- concurrent.futures
- ctypes
- http.cookies
- multiprocessing
- queue
- tempfile
- unittest.case
- urllib.parse</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- concurrent.futures
- ctypes
- http.cookies
- multiprocessing
- queue
- tempfile
- unittest.case
- urllib.parse</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39812: Remove daemon threads in concurrent.futures (GH-19149)</title>
<updated>2020-03-27T19:31:22+00:00</updated>
<author>
<name>Kyle Stanley</name>
<email>aeros167@gmail.com</email>
</author>
<published>2020-03-27T19:31:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b61b818d916942aad1f8f3e33181801c4a1ed14b'/>
<id>b61b818d916942aad1f8f3e33181801c4a1ed14b</id>
<content type='text'>
Remove daemon threads from :mod:`concurrent.futures` by adding
an internal `threading._register_atexit()`, which calls registered functions
prior to joining all non-daemon threads. This allows for compatibility
with subinterpreters, which don't support daemon threads.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove daemon threads from :mod:`concurrent.futures` by adding
an internal `threading._register_atexit()`, which calls registered functions
prior to joining all non-daemon threads. This allows for compatibility
with subinterpreters, which don't support daemon threads.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39678: refactor queue manager thread (GH-18551)</title>
<updated>2020-03-01T20:49:14+00:00</updated>
<author>
<name>Thomas Moreau</name>
<email>thomas.moreau.2010@gmail.com</email>
</author>
<published>2020-03-01T20:49:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0e89076247580ba0e570c4816f0e5628a7e36e83'/>
<id>0e89076247580ba0e570c4816f0e5628a7e36e83</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39104: Fix hanging ProcessPoolExecutor on shutdown nowait with pickling failure (GH-17670)</title>
<updated>2020-02-16T18:09:26+00:00</updated>
<author>
<name>Thomas Moreau</name>
<email>thomas.moreau.2010@gmail.com</email>
</author>
<published>2020-02-16T18:09:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a5cbab552d294d99fde864306632d7e511a75d3c'/>
<id>a5cbab552d294d99fde864306632d7e511a75d3c</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39349: Add *cancel_futures* to Executor.shutdown() (GH-18057)</title>
<updated>2020-02-02T12:49:00+00:00</updated>
<author>
<name>Kyle Stanley</name>
<email>aeros167@gmail.com</email>
</author>
<published>2020-02-02T12:49:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=339fd46cb764277cbbdc3e78dcc5b45b156bb6ae'/>
<id>339fd46cb764277cbbdc3e78dcc5b45b156bb6ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31783: Fix a race condition creating workers during shutdown (#13171)</title>
<updated>2019-06-28T18:54:52+00:00</updated>
<author>
<name>Brian Quinlan</name>
<email>brian@sweetapp.com</email>
</author>
<published>2019-06-28T18:54:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=242c26f53edb965e9808dd918089e664c0223407'/>
<id>242c26f53edb965e9808dd918089e664c0223407</id>
<content type='text'>
* bpo-31783: Fix a race condition while creating workers during interpreter shutdown

* 📜🤖 Added by blurb_it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bpo-31783: Fix a race condition while creating workers during interpreter shutdown

* 📜🤖 Added by blurb_it.
</pre>
</div>
</content>
</entry>
</feed>
