mirror of https://github.com/python/cpython
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170)
This commit is contained in:
parent
d1ae24e888
commit
ae5b3260dd
|
@ -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…
Reference in New Issue