1 | =head1 NAME |
1 | =head1 => NAME |
2 | |
2 | |
3 | AnyEvent - provide framework for multiple event loops |
3 | AnyEvent - provide framework for multiple event loops |
4 | |
4 | |
5 | EV, Event, Glib, Tk, Perl, Event::Lib, Qt, POE - various supported event loops |
5 | EV, Event, Glib, Tk, Perl, Event::Lib, Qt, POE - various supported event loops |
6 | |
6 | |
… | |
… | |
691 | no warnings; |
691 | no warnings; |
692 | use strict; |
692 | use strict; |
693 | |
693 | |
694 | use Carp; |
694 | use Carp; |
695 | |
695 | |
696 | our $VERSION = '3.5'; |
696 | our $VERSION = '3.6'; |
697 | our $MODEL; |
697 | our $MODEL; |
698 | |
698 | |
699 | our $AUTOLOAD; |
699 | our $AUTOLOAD; |
700 | our @ISA; |
700 | our @ISA; |
701 | |
701 | |
… | |
… | |
811 | package AnyEvent::Base; |
811 | package AnyEvent::Base; |
812 | |
812 | |
813 | # default implementation for ->condvar |
813 | # default implementation for ->condvar |
814 | |
814 | |
815 | sub condvar { |
815 | sub 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 | |
821 | our %SIG_CB; |
821 | our %SIG_CB; |
… | |
… | |
944 | $_[0]{_ae_end_cb} = $_[1] if @_ > 1; |
944 | $_[0]{_ae_end_cb} = $_[1] if @_ > 1; |
945 | } |
945 | } |
946 | |
946 | |
947 | sub end { |
947 | sub 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; |
… | |
… | |
1495 | Implementations: L<AnyEvent::Impl::EV>, L<AnyEvent::Impl::Event>, |
1495 | Implementations: L<AnyEvent::Impl::EV>, L<AnyEvent::Impl::Event>, |
1496 | L<AnyEvent::Impl::Glib>, L<AnyEvent::Impl::Tk>, L<AnyEvent::Impl::Perl>, |
1496 | L<AnyEvent::Impl::Glib>, L<AnyEvent::Impl::Tk>, L<AnyEvent::Impl::Perl>, |
1497 | L<AnyEvent::Impl::EventLib>, L<AnyEvent::Impl::Qt>, |
1497 | L<AnyEvent::Impl::EventLib>, L<AnyEvent::Impl::Qt>, |
1498 | L<AnyEvent::Impl::POE>. |
1498 | L<AnyEvent::Impl::POE>. |
1499 | |
1499 | |
|
|
1500 | Asynchronous DNS: L<AnyEvent::DNS>. |
|
|
1501 | |
1500 | Coroutine support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, L<Coro::Event>, |
1502 | Coroutine support: L<Coro>, L<Coro::AnyEvent>, L<Coro::EV>, L<Coro::Event>, |
1501 | |
1503 | |
1502 | Nontrivial usage examples: L<Net::FCP>, L<Net::XMPP2>. |
1504 | Nontrivial usage examples: L<Net::FCP>, L<Net::XMPP2>. |
1503 | |
1505 | |
1504 | |
1506 | |