]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.8] Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882) (GH-22010)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 4 Sep 2020 22:30:21 +0000 (15:30 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Sep 2020 22:30:21 +0000 (15:30 -0700)
commit4ddb2d73ac661af516a252fe697ec05e726b0f20
tree64752c4d7c9eba1f0370786fcea8b4567659b85c
parente77547b90cb3b819113c722579a7fc070de0c2ca
[3.8] Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882) (GH-22010)

I added some information to the `Concurrency and Multithreading` section of the `Developing with asyncio` guide.

This is all information that would have helped me when I started using asyncio. I incorrectly assumed that `loop.call_soon_threadsafe()` and `run_coroutine_threadsafe()` could be called from a thread in a process separate from the one that the event loop is running in. Explicitly stating that this will not work will probably help some people starting out with asyncio in the future.

I also added references to some other functions that can be used for inter-process communication without blocking the event loop. The section already mentions running blocking code in a ThreadPoolExecutor, but I think listing these other options in this section will also be helpful.
(cherry picked from commit c68c5af2dc5ada8875a662f2beaac6234eae2a5a)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
Doc/library/asyncio-dev.rst