diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-11-07 16:03:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-07 16:03:28 (GMT) |
commit | 22b1128559bdeb96907da5840960691bb050d11a (patch) | |
tree | d2555daea1452b34695fc19efb2c7a5242a6a755 /Lib/asyncio | |
parent | 39a156c505b7dc431a0a4cffcbefca577848db38 (diff) | |
download | cpython-22b1128559bdeb96907da5840960691bb050d11a.zip cpython-22b1128559bdeb96907da5840960691bb050d11a.tar.gz cpython-22b1128559bdeb96907da5840960691bb050d11a.tar.bz2 |
bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/futures.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py index 215f72d..3dc9c500 100644 --- a/Lib/asyncio/futures.py +++ b/Lib/asyncio/futures.py @@ -32,11 +32,13 @@ class Future: Differences: + - This class is not thread-safe. + - result() and exception() do not take a timeout argument and raise an exception when the future isn't done yet. - Callbacks registered with add_done_callback() are always called - via the event loop's call_soon_threadsafe(). + via the event loop's call_soon(). - This class is not compatible with the wait() and as_completed() methods in the concurrent.futures package. |