--- Coro/Coro.pm 2007/09/22 14:42:56 1.134 +++ Coro/Coro.pm 2007/09/22 22:39:15 1.135 @@ -243,15 +243,13 @@ while () { eval { while () { +# &{&_pool_1 or &terminate}; # crashes, would be ~5% faster $cb = &_pool_1 - or return; - + or &terminate; &$cb; - - return if &_pool_2; - undef $cb; - schedule; + &terminate if &_pool_2; + &schedule; } }; @@ -261,7 +259,7 @@ sub async_pool(&@) { # this is also inlined into the unlock_scheduler - my $coro = (pop @async_pool) || new Coro \&pool_handler;; + my $coro = (pop @async_pool) || new Coro \&pool_handler; $coro->{_invoke} = [@_]; $coro->ready;