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.28 by root, Fri Nov 14 02:42:26 2008 UTC vs.
Revision 1.29 by root, Fri Nov 14 23:48:10 2008 UTC

72 72
73Blocks the coroutine until either the given event set has occured on the 73Blocks the coroutine until either the given event set has occured on the
74fd, or the timeout has been reached (if timeout is zero, there is no 74fd, or the timeout has been reached (if timeout is zero, there is no
75timeout). Returns the received flags. 75timeout). Returns the received flags.
76 76
77=cut
78
79sub timed_io_once($$;$) {
80 &_timed_io_once;
81 do { &Coro::schedule } while !$#_;
82 pop
83}
84
85=item Coro::EV::timer_once $after 77=item Coro::EV::timer_once $after
86 78
87Blocks the coroutine for at least C<$after> seconds. 79Blocks the coroutine for at least C<$after> seconds.
88 80
89=cut 81=cut
90
91sub timer_once($) {
92 &_timer_once;
93 do { &Coro::schedule } while !$#_;
94 pop
95}
96
97sub readable_ev {
98 _readable_ev $_[0], my $done;
99 do { &Coro::schedule } while !defined $done;
100 $done
101}
102
103sub writable_ev {
104 _writable_ev $_[0], my $done;
105 do { &Coro::schedule } while !defined $done;
106 $done
107}
108 82
1091; 831;
110 84
111=back 85=back
112 86

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines