Merge 3.4 (asyncio doc)
This commit is contained in:
commit
25638d3109
|
@ -74,6 +74,11 @@ the event loop.
|
||||||
The :ref:`Synchronization primitives <asyncio-sync>` section describes ways
|
The :ref:`Synchronization primitives <asyncio-sync>` section describes ways
|
||||||
to synchronize tasks.
|
to synchronize tasks.
|
||||||
|
|
||||||
|
The :ref:`Subprocess and threads <asyncio-subprocess-threads>` section lists
|
||||||
|
asyncio limitations to run subprocesses from different threads.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _asyncio-handle-blocking:
|
.. _asyncio-handle-blocking:
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,25 @@ Process
|
||||||
``N`` (Unix only).
|
``N`` (Unix only).
|
||||||
|
|
||||||
|
|
||||||
|
.. _asyncio-subprocess-threads:
|
||||||
|
|
||||||
|
Subprocess and threads
|
||||||
|
======================
|
||||||
|
|
||||||
|
asyncio supports running subprocesses from different threads, but there
|
||||||
|
are limits:
|
||||||
|
|
||||||
|
* An event loop must run in the main thread
|
||||||
|
* The child watcher must be instantiated in the main thread, before executing
|
||||||
|
subprocesses from other threads. Call the :func:`get_child_watcher`
|
||||||
|
function in the main thread to instantiate the child watcher.
|
||||||
|
|
||||||
|
.. seealso::
|
||||||
|
|
||||||
|
The :ref:`Concurrency and multithreading in asyncio
|
||||||
|
<asyncio-multithreading>` section.
|
||||||
|
|
||||||
|
|
||||||
Subprocess examples
|
Subprocess examples
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue