--- AnyEvent/lib/AE.pm 2011/08/16 14:47:26 1.11 +++ AnyEvent/lib/AE.pm 2011/10/05 23:12:07 1.14 @@ -28,11 +28,11 @@ # called when event loop idle (if applicable) my $w = AE::idle sub { ... }; - my $w = AE::cv; # stores whether a condition was flagged - $w->send; # wake up current and all future recv's - $w->recv; # enters "main loop" till $condvar gets ->send + my $cv = AE::cv; # stores whether a condition was flagged + $cv->send; # wake up current and all future recv's + $cv->recv; # enters "main loop" till $condvar gets ->send # use a condvar in callback mode: - $w->cb (sub { $_[0]->recv }); + $cv->cb (sub { $_[0]->recv }); =head1 DESCRIPTION @@ -55,12 +55,8 @@ overhead is very noticeable (with EV it increases the execution time five- to six-fold, with Perl the method call overhead is about a factor of two). -At the moment, there is no checking (L does not -affect this API), so the L API still has a definite advantage -here. - Note that the C API is an alternative to, not the future version of, -the AnyEvent API. Both APIs can be used interchangeably and and there are +the AnyEvent API. Both APIs can be used interchangeably and there are no plans to "switch", so if in doubt, feel free to use the L API in new code. @@ -69,11 +65,15 @@ you should not C directly, C will provide the AE namespace. +At the moment, these functions will become slower then their method-call +counterparts when using L or L::wrap. + =head2 FUNCTIONS -This section briefly describes the alternative watcher -constructors. Semantics are not described here; please -refer to the L manpage for the details. +This section briefly describes the alternative watcher constructors and +other functions available inside the C namespace. Semantics are not +described here; please refer to the description of the function or method +with the same name in the L manpage for the details. =over 4