mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170)
This commit is contained in:
parent
d1ae24e888
commit
ae5b3260dd
1 changed files with 2 additions and 1 deletions
|
@ -517,7 +517,8 @@ def ensure_future(coro_or_future, *, loop=None):
|
|||
elif compat.PY35 and inspect.isawaitable(coro_or_future):
|
||||
return ensure_future(_wrap_awaitable(coro_or_future), loop=loop)
|
||||
else:
|
||||
raise TypeError('A Future, a coroutine or an awaitable is required')
|
||||
raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
|
||||
'required')
|
||||
|
||||
|
||||
@coroutine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue