23 Nov
2017
23 Nov
'17
12:48 p.m.
Le 23/11/2017 à 13:42, Ivan Levkivskyi a écrit :
Great, so I open this page and see this code:
results = [] for future in list_of_futures: results.append(yield future)
Interesting, why don't they use a comprehension for this and instead need to invent a whole `tornado.gen.multi` function?
1) because it schedules the yielded coroutines in parallel (the "for" loop isn't strictly equivalent, as AFAIU it would schedule the coroutines serially) 2) because it accepts an optional argument to quiet some exceptions Regards Antoine.