event grouping and Coro

gleeco gleeco at gmail.com
Tue Feb 28 18:56:55 CET 2012


i'm wondering what the best way to handle logical grouping in Coro for
mutliple things that you might want to control in a single thread.
Coming from AE, here's a typical use case:

$cv = AE::cv
for qw( foo.com bar.com ) {
  $cv->begin
  http_get $_, sub {  $cv->end };
}
$cv->wait;

I would like to employ this grouping in a single Coro thread.  I understand
rouse_cb, but in this case, it doesn't seem to make sense where there are
>1 events per thread that i'm waiting on.

Thanks in advance!

-gleeco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/anyevent/attachments/20120228/0f601ed8/attachment.html>


More information about the anyevent mailing list