AnyEvent::Internals AE::* use AE 5 ; my $w = AE::io $fh , 0 , sub { w arn '$fh is readable' ; }; my $w = AE::io $fh , 1 , sub { warn '$fh is writable' ; }; my $w = AE::timer 1 , 0 , sub { warn '1 second passed' ; }; my $w = AE::timer 0 , 1, sub { warn 'every 1 second' ; }; my $w = AE::signal TERM => sub { warn 'TERM received' ; }; my $w = AE::idle { warn 'Event loop is idle' ; };
AnyEvent::Internals AE::cv use AE 5 ; my $cv = AE:: cv ; any sub { async sub { calls sub { $cv -> send ; }; }; }; $cv -> recv ; # Run loop until get send
AnyEvent::Internals AE::cv use AE 5 ; my $cv = AE :: cv { warn "All done" }; for ( 1 . .10 ) { $cv -> begin ; async_call sub { may_be_nested sub { $cv -> end ; } } }