10000 Update asyncio.ensure_future() documentation (GH-15347) · python/cpython@092911d · GitHub
[go: up one dir, main page]

Skip to content

Commit 092911d

Browse files
akindofyoga1st1
authored andcommitted
Update asyncio.ensure_future() documentation (GH-15347)
Added back mention that ensure_future actually scheduled obj. This documentation just mentions what ensure_future returns, so I did not realize that ensure_future also schedules obj.
1 parent 20f59fe commit 092911d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/asyncio-future.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ Future Functions
3535
is used for the test.)
3636

3737
* a :class:`Task` object wrapping *obj*, if *obj* is a
38-
coroutine (:func:`iscoroutine` is used for the test.)
38+
coroutine (:func:`iscoroutine` is used for the test);
39+
in this case the coroutine will be scheduled by
40+
``ensure_future()``.
3941

4042
* a :class:`Task` object that would await on *obj*, if *obj* is an
4143
awaitable (:func:`inspect.isawaitable` is used for the test.)

0 commit comments

Comments
 (0)
0