Staging
v0.5.1
https://github.com/python/cpython
Revision 4ddb2d73ac661af516a252fe697ec05e726b0f20 authored by Miss Islington (bot) on 04 September 2020, 22:30:21 UTC, committed by GitHub on 04 September 2020, 22:30:21 UTC


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>
1 parent e77547b
Raw File
Tip revision: 4ddb2d73ac661af516a252fe697ec05e726b0f20 authored by Miss Islington (bot) on 04 September 2020, 22:30:21 UTC
[3.8] Improve asyncio-dev 'Concurrency and Multithreading' docs (GH-20882) (GH-22010)
Tip revision: 4ddb2d7
__init__.py
"""Core XML support for Python.

This package contains four sub-packages:

dom -- The W3C Document Object Model.  This supports DOM Level 1 +
       Namespaces.

parsers -- Python wrappers for XML parsers (currently only supports Expat).

sax -- The Simple API for XML, developed by XML-Dev, led by David
       Megginson and ported to Python by Lars Marius Garshol.  This
       supports the SAX 2 API.

etree -- The ElementTree XML library.  This is a subset of the full
       ElementTree XML release.

"""


__all__ = ["dom", "parsers", "sax", "etree"]
back to top