Kaydet (Commit) 518c6b97 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) Antoine Pitrou

bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (GH-4319) (#4320)

(cherry picked from commit 22b11285)
üst d9c61c2a
......@@ -216,7 +216,7 @@ Future
raise an exception when the future isn't done yet.
- Callbacks registered with :meth:`add_done_callback` are always called
via the event loop's :meth:`~AbstractEventLoop.call_soon_threadsafe`.
via the event loop's :meth:`~AbstractEventLoop.call_soon`.
- This class is not compatible with the :func:`~concurrent.futures.wait` and
:func:`~concurrent.futures.as_completed` functions in the
......
......@@ -112,11 +112,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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment