Skip to content

[3.9] Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882) #22009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 29, 2020

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 c68c5af)

Co-authored-by: Roger Iyengar ri@rogeriyengar.com

Automerge-Triggered-By: @Mariatta

…0882)

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 c68c5af)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
@miss-islington
Copy link
Contributor Author

Sorry, I can't merge this PR. Reason: Base branch was modified. Review and try the merge again..

@miss-islington miss-islington merged commit bf8bf1c into python:3.9 Sep 4, 2020
@miss-islington miss-islington deleted the backport-c68c5af-3.9 branch September 4, 2020 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants