Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
399c59d7
Commit
399c59d7
authored
Jan 09, 2015
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio doc: list limitations to run subprocesses from different threads
parent
15cc678d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Doc/library/asyncio-dev.rst
Doc/library/asyncio-dev.rst
+5
-0
Doc/library/asyncio-subprocess.rst
Doc/library/asyncio-subprocess.rst
+19
-0
No files found.
Doc/library/asyncio-dev.rst
View file @
399c59d7
...
...
@@ -74,6 +74,11 @@ the event loop.
The :ref:`Synchronization primitives <asyncio-sync>` section describes ways
to synchronize tasks.
The :ref:`Subprocess and threads <asyncio-subprocess-threads>` section lists
asyncio limitations to run subprocesses from different threads.
.. _asyncio-handle-blocking:
...
...
Doc/library/asyncio-subprocess.rst
View file @
399c59d7
...
...
@@ -297,6 +297,25 @@ Process
``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
===================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment