Kaydet (Commit) ae5b3260 authored tarafından Charles Renwick's avatar Charles Renwick Kaydeden (comit) Mariatta

bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170)

üst d1ae24e8
...@@ -517,7 +517,8 @@ def ensure_future(coro_or_future, *, loop=None): ...@@ -517,7 +517,8 @@ def ensure_future(coro_or_future, *, loop=None):
elif compat.PY35 and inspect.isawaitable(coro_or_future): elif compat.PY35 and inspect.isawaitable(coro_or_future):
return ensure_future(_wrap_awaitable(coro_or_future), loop=loop) return ensure_future(_wrap_awaitable(coro_or_future), loop=loop)
else: 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 @coroutine
......
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