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

Comparing Coro/Event/Event.pm (file contents):
Revision 1.76 by root, Sat Nov 22 07:30:46 2008 UTC vs.
Revision 1.77 by root, Mon Nov 24 04:56:38 2008 UTC

104 104
105Create and return a watcher of the given type. 105Create and return a watcher of the given type.
106 106
107Examples: 107Examples:
108 108
109 my $reader = Coro::Event->io(fd => $filehandle, poll => 'r'); 109 my $reader = Coro::Event->io (fd => $filehandle, poll => 'r');
110 $reader->next; 110 $reader->next;
111 111
112=cut 112=cut
113 113
114=item $w->next 114=item $w->next
202Same as Event::unloop (provided here for your convinience only). 202Same as Event::unloop (provided here for your convinience only).
203 203
204=cut 204=cut
205 205
206# very inefficient 206# very inefficient
207our $event_idle = new Coro sub { 207our $IDLE = new Coro sub {
208 while () { 208 while () {
209 &Event::one_event; 209 &Event::one_event;
210 &Coro::schedule; 210 &Coro::schedule;
211 } 211 }
212}; 212};
213$event_idle->{desc} = "[Event idle process]"; 213$IDLE->{desc} = "[Event idle process]";
214 214
215$Coro::idle = sub { $event_idle->ready }; 215$Coro::idle = $IDLE;
216 216
2171; 2171;
218 218
219=back 219=back
220 220

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines