--- AnyEvent/README 2009/08/09 16:05:11 1.51 +++ AnyEvent/README 2009/08/10 01:17:38 1.52 @@ -645,9 +645,10 @@ Every call to "->begin" will increment a counter, and every call to "->end" will decrement it. If the counter reaches 0 in "->end", the - (last) callback passed to "begin" will be executed. That callback is - *supposed* to call "->send", but that is not required. If no - callback was set, "send" will be called without any arguments. + (last) callback passed to "begin" will be executed, passing the + condvar as first argument. That callback is *supposed* to call + "->send", but that is not required. If no group callback was set, + "send" will be called without any arguments. You can think of "$cv->send" giving you an OR condition (one call sends), while "$cv->begin" and "$cv->end" giving you an AND @@ -685,7 +686,7 @@ my $cv = AnyEvent->condvar; my %result; - $cv->begin (sub { $cv->send (\%result) }); + $cv->begin (sub { shift->send (\%result) }); for my $host (@list_of_hosts) { $cv->begin;