We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a5f94b commit cad7729Copy full SHA for cad7729
asyncio_slow/asyncio_slow.py
@@ -47,7 +47,7 @@ def _cb():
47
self.call_soon(_cb)
48
49
def run_until_complete(self, coro):
50
- t = async(coro)
+ t = ensure_future(coro)
51
t.add_done_callback(lambda a: self.stop())
52
self.run_forever()
53
@@ -109,7 +109,7 @@ def coroutine(f):
109
return f
110
111
112
-def async(coro):
+def ensure_future(coro):
113
if isinstance(coro, Future):
114
return coro
115
return Task(coro)
@@ -136,7 +136,7 @@ def wait(coro_list, loop=_def_event_loop):
136
w = _Wait(len(coro_list))
137
138
for c in coro_list:
139
- t = async(c)
+ t = ensure_future(c)
140
t.add_done_callback(lambda val: w._done())
141
142
return w
0 commit comments