Skip to content

Commit 6615fa4

Browse files
committed
Add note distinguishing concurrent.futures.Future from asyncio.Future
1 parent 23ad9c5 commit 6615fa4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Doc/library/asyncio-future.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ the Future has a result::
254254
asyncio.run(main())
255255

256256

257+
.. _asyncio-vs-concurrent-futures:
258+
257259
.. important::
258260

259261
The Future object was designed to mimic

Doc/library/concurrent.futures.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ or separate processes, using :class:`ProcessPoolExecutor`.
2121
Each implements the same interface, which is defined
2222
by the abstract :class:`Executor` class.
2323

24+
.. important::
25+
26+
:class:`concurrent.futures.Future` must not be confused with
27+
:class:`asyncio.Future`, which is designed for use with :mod:`asyncio`
28+
tasks and coroutines. See :ref:`asyncio-vs-concurrent-futures` for a
29+
detailed comparison of the two.
30+
2431
.. include:: ../includes/wasm-notavail.rst
2532

2633
Executor Objects

0 commit comments

Comments
 (0)