diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-24 12:18:47 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-24 12:18:47 (GMT) |
| commit | 07171242d5ea3bc56a05a548ffa2deb9e0e5420d (patch) | |
| tree | 08a23669577d8c52128616212dfd140fc54c316b | |
| parent | eb44b2d9e838323be04a2dc92532f3d2dbbf05d5 (diff) | |
| download | cpython-07171242d5ea3bc56a05a548ffa2deb9e0e5420d.zip cpython-07171242d5ea3bc56a05a548ffa2deb9e0e5420d.tar.gz cpython-07171242d5ea3bc56a05a548ffa2deb9e0e5420d.tar.bz2 | |
subprocess.Popen.wait doc: mention asyncio to avoid busy loop
| -rw-r--r-- | Doc/library/subprocess.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 1a9dd9d..f03c322 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -629,6 +629,12 @@ Instances of the :class:`Popen` class have the following methods: :exc:`TimeoutExpired` exception. It is safe to catch this exception and retry the wait. + .. note:: + + The function is implemented using a busy loop (non-blocking call and + short sleeps). Use the :mod:`asyncio` module for an asynchronous wait: + see :class:`asyncio.create_subprocess_exec`. + .. warning:: This will deadlock when using ``stdout=PIPE`` and/or |
