File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,11 @@ async def fetch_finished(self, futures):
58
58
done = set ()
59
59
try :
60
60
done , pending = await asyncio .wait (
61
- futures , return_when = asyncio .FIRST_COMPLETED
61
+ [
62
+ asyncio .create_task (f ) if not isinstance (f , asyncio .Task ) else f
63
+ for f in futures
64
+ ],
65
+ return_when = asyncio .FIRST_COMPLETED ,
62
66
)
63
67
except ValueError :
64
68
# nothing pending!
@@ -105,7 +109,11 @@ async def fetch_finished(self, futures):
105
109
try :
106
110
self ._jobs += len (futures )
107
111
done , pending = await asyncio .wait (
108
- futures , return_when = asyncio .FIRST_COMPLETED
112
+ [
113
+ asyncio .create_task (f ) if not isinstance (f , asyncio .Task ) else f
114
+ for f in futures
115
+ ],
116
+ return_when = asyncio .FIRST_COMPLETED ,
109
117
)
110
118
except ValueError :
111
119
# nothing pending!
You can’t perform that action at this time.
0 commit comments