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

Comparing Coro/EV/EV.pm (file contents):
Revision 1.5 by root, Thu Nov 1 08:28:58 2007 UTC vs.
Revision 1.6 by root, Wed Nov 7 20:40:30 2007 UTC

58 XSLoader::load __PACKAGE__, $VERSION; 58 XSLoader::load __PACKAGE__, $VERSION;
59} 59}
60 60
61unshift @AnyEvent::REGISTRY, [Coro::EV => "EV::AnyEvent"]; 61unshift @AnyEvent::REGISTRY, [Coro::EV => "EV::AnyEvent"];
62 62
63# relatively inefficient
64our $ev_idle = new Coro sub {
65 while () {
66 EV::loop EV::LOOP_ONESHOT;
67 &Coro::schedule;
68 }
69};
70$ev->{desc} = "[EV idle process]"; 63$ev->{desc} = "[EV idle process]";
71 64
72$Coro::idle = sub { $ev_idle->ready }; 65$Coro::idle = sub {
66 EV::loop EV::LOOP_ONESHOT;
67};
73 68
74=item $revents = Coro::EV::timed_io_once $fd, $events, $timeout 69=item $revents = Coro::EV::timed_io_once $fd, $events, $timeout
75 70
76Blocks the coroutine until either the given event set has occured on the 71Blocks the coroutine until either the given event set has occured on the
77fd, or the timeout has been reached (if timeout is zero, there is no 72fd, or the timeout has been reached (if timeout is zero, there is no

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines