ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.123 by root, Fri May 23 20:41:25 2008 UTC vs.
Revision 1.124 by root, Fri May 23 22:52:31 2008 UTC

1=head1 NAME 1=head1 => NAME
2 2
3AnyEvent - provide framework for multiple event loops 3AnyEvent - provide framework for multiple event loops
4 4
5EV, Event, Glib, Tk, Perl, Event::Lib, Qt, POE - various supported event loops 5EV, Event, Glib, Tk, Perl, Event::Lib, Qt, POE - various supported event loops
6 6
811package AnyEvent::Base; 811package AnyEvent::Base;
812 812
813# default implementation for ->condvar 813# default implementation for ->condvar
814 814
815sub condvar { 815sub condvar {
816 bless {}, AnyEvent::CondVar:: 816 bless { @_ == 3 ? (_ae_cb => $_[2]) : () }, AnyEvent::CondVar::
817} 817}
818 818
819# default implementation for ->signal 819# default implementation for ->signal
820 820
821our %SIG_CB; 821our %SIG_CB;
944 $_[0]{_ae_end_cb} = $_[1] if @_ > 1; 944 $_[0]{_ae_end_cb} = $_[1] if @_ > 1;
945} 945}
946 946
947sub end { 947sub end {
948 return if --$_[0]{_ae_counter}; 948 return if --$_[0]{_ae_counter};
949 &{ $_[0]{_ae_end_cb} } if $_[0]{_ae_end_cb}; 949 &{ $_[0]{_ae_end_cb} || sub { $_[0]->send } };
950} 950}
951 951
952# undocumented/compatibility with pre-3.4 952# undocumented/compatibility with pre-3.4
953*broadcast = \&send; 953*broadcast = \&send;
954*wait = \&_wait; 954*wait = \&_wait;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines