$f->on_ready(sub {
$loop->stop if $f == $await[-1]
});
+ warn "running loop for ${f} [@{await}]";
$loop->run;
}
if (@await and $await[-1]->is_ready) {
}
sub await_all {
- await_future(CPS::Future->wait_all(@_));
+ my @subs = @_;
+ for my $sub (@subs) {
+ warn "awaiting ${sub}";
+ await_future(CPS::Future->wait_all($sub));
+ }
map $_->get, @_;
}