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.38 by root, Sat Jun 20 07:16:31 2009 UTC vs.
Revision 1.39 by root, Mon Jun 22 11:25:53 2009 UTC

24running the main loop will inhibit event processing, while threads of 24running the main loop will inhibit event processing, while threads of
25lower priority will get the CPU, but cannot completeley inhibit event 25lower priority will get the CPU, but cannot completeley inhibit event
26processing. Note that for that to work you actually have to run the EV 26processing. Note that for that to work you actually have to run the EV
27event loop in some thread. 27event loop in some thread.
28 28
29=head2 RUNNING WITH OR WITHOUT A MAINLOOP 29=head1 RUNNING WITH OR WITHOUT A MAINLOOP
30 30
31In general, you should always run EV::loop, either in your main program, 31In general, you should always run EV::loop, either in your main program,
32or in a separate coroutine. If you don't do that and all coroutines 32or in a separate coroutine. If you don't do that and all coroutines
33start waiting for some events, this module will run the event loop once, 33start waiting for some events, this module will run the event loop once,
34but this is very inefficient and will also not make it possible to run 34but this is very inefficient and will also not make it possible to run
72}; 72};
73$IDLE->{desc} = "[EV idle process]"; 73$IDLE->{desc} = "[EV idle process]";
74 74
75$Coro::idle = $IDLE; 75$Coro::idle = $IDLE;
76 76
77=item $revents = Coro::EV::timed_io_once $fileno_or_fh, $events, $timeout 77=item $revents = Coro::EV::timed_io_once $fileno_or_fh, $events[, $timeout]
78 78
79Blocks the coroutine until either the given event set has occured on the 79Blocks the coroutine until either the given event set has occured on the
80fd, or the timeout has been reached (if timeout is zero, there is no 80fd, or the timeout has been reached (if timeout is missing or C<undef>
81timeout). Returns the received flags. 81then there will be no timeout). Returns the received flags.
82 82
83=item Coro::EV::timer_once $after 83=item Coro::EV::timer_once $after
84 84
85Blocks the coroutine for at least C<$after> seconds. 85Blocks the coroutine for at least C<$after> seconds.
86 86

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines