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.3 by root, Thu Nov 1 06:58:21 2007 UTC vs.
Revision 1.4 by root, Thu Nov 1 07:04:20 2007 UTC

5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use Coro; 7 use Coro;
8 use Coro::EV; 8 use Coro::EV;
9 9
10 loop; 10=head1 DESCRIPTION
11 11
12=head1 DESCRIPTION 12This module does two things: First, it offers some utility functions that
13might be useful for coroutines, and secondly, it integrates Coro into the
14EV main loop:
15
16Before the process blocks (in EV::loop) to wait for events, this module
17will schedule and run all ready (= runnable) coroutines of the same or
18higher priority. After that, it will cede once to a coroutine of lower
19priority, then continue in the event loop.
20
21That means that coroutines with the same or higher pripority as the
22coroutine running the main loop will inhibit event processing, while
23coroutines of lower priority will get the CPU, but cannot completeley
24inhibit event processing.
13 25
14=head1 FUNCTIONS 26=head1 FUNCTIONS
15 27
16=over 4 28=over 4
17 29
72 &_timer_once; 84 &_timer_once;
73 do { &Coro::schedule } while !$#_; 85 do { &Coro::schedule } while !$#_;
74 pop 86 pop
75} 87}
76 88
77#sub timer_abs_once($$) {
78# &_timer_abs_once;
79# do { &Coro::schedule } while !$#_;
80# pop
81#}
82
831; 891;
84 90
85=back 91=back
86 92
87=head1 AUTHOR 93=head1 AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines