ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Kernel.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Kernel.pm (file contents):
Revision 1.54 by root, Thu Oct 1 20:41:36 2009 UTC vs.
Revision 1.55 by root, Thu Oct 1 20:51:16 2009 UTC

179 179
180our $DELAY_TIMER; 180our $DELAY_TIMER;
181our @DELAY_QUEUE; 181our @DELAY_QUEUE;
182 182
183sub _delay_run { 183sub _delay_run {
184 (shift @DELAY_QUEUE or return)->() while 1; 184 (shift @DELAY_QUEUE or return undef $DELAY_TIMER)->() while 1;
185 undef $DELAY_TIMER;
186} 185}
187 186
188sub delay($) { 187sub delay($) {
189 push @DELAY_QUEUE, shift; 188 push @DELAY_QUEUE, shift;
190 $DELAY_TIMER ||= AE::timer 0, 0, \&_delay_run; 189 $DELAY_TIMER ||= AE::timer 0, 0, \&_delay_run;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines