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

Comparing Coro/Coro.pm (file contents):
Revision 1.127 by root, Sat Aug 18 17:32:07 2007 UTC vs.
Revision 1.128 by root, Wed Sep 19 21:39:15 2007 UTC

50 50
51our $idle; # idle handler 51our $idle; # idle handler
52our $main; # main coroutine 52our $main; # main coroutine
53our $current; # current coroutine 53our $current; # current coroutine
54 54
55our $VERSION = '3.64'; 55our $VERSION = '3.7';
56 56
57our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); 57our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub);
58our %EXPORT_TAGS = ( 58our %EXPORT_TAGS = (
59 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], 59 prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)],
60); 60);
249 } 249 }
250} 250}
251 251
252sub async_pool(&@) { 252sub async_pool(&@) {
253 # this is also inlined into the unlock_scheduler 253 # this is also inlined into the unlock_scheduler
254 my $coro = (pop @pool) || do {
254 my $coro = (pop @pool or new Coro \&pool_handler); 255 my $coro = new Coro \&pool_handler;
256 $coro->{desc} = "async_pool";
257 $coro
258 };
255 259
256 $coro->{_invoke} = [@_]; 260 $coro->{_invoke} = [@_];
257 $coro->ready; 261 $coro->ready;
258 262
259 $coro 263 $coro

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines