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.49 by root, Tue Oct 9 22:29:27 2007 UTC vs.
Revision 1.50 by root, Wed Oct 10 03:24:40 2007 UTC

151 bless $w, $class 151 bless $w, $class
152 }; 152 };
153 *{ $flavour } = $coronew; 153 *{ $flavour } = $coronew;
154 *{"do_$flavour"} = sub { 154 *{"do_$flavour"} = sub {
155 unshift @_, Coro::Event::; 155 unshift @_, Coro::Event::;
156 next_cancel (&$coronew); 156 @_ = &$coronew;
157 &Coro::schedule while &_next;
158 &_event
157 }; 159 };
160}
161
162# do schedule in perl to avoid forcing a stack allocation.
163# this is about 10% slower, though.
164sub next($) {
165 &Coro::schedule while &_next;
166 &_event
158} 167}
159 168
160sub Coro::Event::Event::hits { $_[0][3] } 169sub Coro::Event::Event::hits { $_[0][3] }
161sub Coro::Event::Event::got { $_[0][4] } 170sub Coro::Event::Event::got { $_[0][4] }
162 171

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines