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.355 by root, Fri Aug 12 00:53:29 2011 UTC vs.
Revision 1.356 by root, Fri Aug 12 18:41:25 2011 UTC

878 AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse. 878 AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse.
879 AnyEvent::Impl::POE based on POE, very slow, some limitations. 879 AnyEvent::Impl::POE based on POE, very slow, some limitations.
880 AnyEvent::Impl::Irssi used when running within irssi. 880 AnyEvent::Impl::Irssi used when running within irssi.
881 AnyEvent::Impl::IOAsync based on IO::Async. 881 AnyEvent::Impl::IOAsync based on IO::Async.
882 AnyEvent::Impl::Cocoa based on Cocoa::EventLoop. 882 AnyEvent::Impl::Cocoa based on Cocoa::EventLoop.
883 AnyEvent::Impl::FLTK based on FLTK. 883 AnyEvent::Impl::FLTK2 based on FLTK (fltk 2 binding).
884 884
885=item Backends with special needs. 885=item Backends with special needs.
886 886
887Qt requires the Qt::Application to be instantiated first, but will 887Qt requires the Qt::Application to be instantiated first, but will
888otherwise be picked up automatically. As long as the main program 888otherwise be picked up automatically. As long as the main program
1286 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza 1286 [POE::Kernel:: => AnyEvent::Impl::POE::], # lasciate ogni speranza
1287 [Wx:: => AnyEvent::Impl::POE::], 1287 [Wx:: => AnyEvent::Impl::POE::],
1288 [Prima:: => AnyEvent::Impl::POE::], 1288 [Prima:: => AnyEvent::Impl::POE::],
1289 [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # a bitch to autodetect 1289 [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # a bitch to autodetect
1290 [Cocoa::EventLoop:: => AnyEvent::Impl::Cocoa::], 1290 [Cocoa::EventLoop:: => AnyEvent::Impl::Cocoa::],
1291 [FLTK:: => AnyEvent::Impl::FLTK::], 1291 [FLTK:: => AnyEvent::Impl::FLTK2::],
1292); 1292);
1293
1294our %method = map +($_ => 1),
1295 qw(io timer time now now_update signal child idle condvar DESTROY);
1296 1293
1297sub detect() { 1294sub detect() {
1298 # free some memory 1295 # free some memory
1299 *detect = sub () { $MODEL }; 1296 *detect = sub () { $MODEL };
1300 1297
1768 1765
1769 my ($cb, $w, $rcb) = $arg{cb}; 1766 my ($cb, $w, $rcb) = $arg{cb};
1770 1767
1771 $rcb = sub { 1768 $rcb = sub {
1772 if ($cb) { 1769 if ($cb) {
1773 $w = _time; 1770 $w = AE::time;
1774 &$cb; 1771 &$cb;
1775 $w = _time - $w; 1772 $w = AE::time - $w;
1776 1773
1777 # never use more then 50% of the time for the idle watcher, 1774 # never use more then 50% of the time for the idle watcher,
1778 # within some limits 1775 # within some limits
1779 $w = 0.0001 if $w < 0.0001; 1776 $w = 0.0001 if $w < 0.0001;
1780 $w = 5 if $w > 5; 1777 $w = 5 if $w > 5;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines