Skip to content

Commit be628ac

Browse files
committed
asyncio_slow: Fix wait: again, should not schedule anything itself.
1 parent 96cbb50 commit be628ac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

asyncio_slow/asyncio_slow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def async(coro):
115115
return Task(coro)
116116

117117

118-
class Wait(Future):
118+
class _Wait(Future):
119119

120120
def __init__(self, n):
121121
Future.__init__(self)
@@ -133,12 +133,11 @@ def __call__(self):
133133

134134
def wait(coro_list, loop=_def_event_loop):
135135

136-
w = Wait(len(coro_list))
136+
w = _Wait(len(coro_list))
137137

138138
for c in coro_list:
139139
t = async(c)
140140
t.add_done_callback(lambda val: w._done())
141-
loop.call_soon(t)
142141

143142
return w
144143

0 commit comments

Comments
 (0)