--- AnyEvent/lib/AE.pm 2011/08/17 22:03:02 1.12 +++ AnyEvent/lib/AE.pm 2020/07/12 16:31:59 1.18 @@ -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 @@ -70,9 +70,10 @@ =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 @@ -93,6 +94,9 @@ The callback C<$cb> is invoked as soon and as long as I/O of the type specified by C<$watch_write>) can be done on the file handle/descriptor. +If you want a mnemomic for the second argument: C<0> is standard I, +for I, and C<1> is standard I, for I. + Example: wait until STDIN becomes readable. $stdin_ready = AE::io *STDIN, 0, sub { scalar }; @@ -169,7 +173,7 @@ =head1 AUTHOR Marc Lehmann - http://home.schmorp.de/ + http://anyevent.schmorp.de =cut