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.40 by root, Fri Nov 24 15:34:33 2006 UTC vs.
Revision 1.41 by root, Fri Dec 1 02:17:37 2006 UTC

56 56
57use XSLoader; 57use XSLoader;
58 58
59use base Exporter::; 59use base Exporter::;
60 60
61our @EXPORT = qw(loop unloop sweep reschedule); 61our @EXPORT = qw(loop unloop sweep);
62 62
63BEGIN { 63BEGIN {
64 our $VERSION = 1.9; 64 our $VERSION = 1.9;
65 65
66 local $^W = 0; # avoid redefine warning for Coro::ready; 66 local $^W = 0; # avoid redefine warning for Coro::ready;
123} 123}
124 124
125# double calls to avoid stack-cloning ;() 125# double calls to avoid stack-cloning ;()
126# is about 10% slower, though. 126# is about 10% slower, though.
127sub next($) { 127sub next($) {
128 &Coro::schedule if &_next; $_[0]; 128 &Coro::schedule while &_next;
129
130 $_[0]
129} 131}
130 132
131sub Coro::Event::w { $_[0] } 133sub Coro::Event::w { $_[0] }
132sub Coro::Event::prio { $_[0]{Coro::Event}[3] } 134sub Coro::Event::prio { $_[0]{Coro::Event}[3] }
133sub Coro::Event::hits { $_[0]{Coro::Event}[4] } 135sub Coro::Event::hits { $_[0]{Coro::Event}[4] }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines