mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)
This commit is contained in:
parent
39a156c505
commit
22b1128559
2 changed files with 4 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue