--- cvsroot/Coro/Coro.pm 2007/09/22 22:39:15 1.135 +++ cvsroot/Coro/Coro.pm 2007/09/27 16:25:10 1.140 @@ -52,7 +52,7 @@ our $main; # main coroutine our $current; # current coroutine -our $VERSION = '3.7'; +our $VERSION = '3.8'; our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); our %EXPORT_TAGS = ( @@ -243,16 +243,14 @@ while () { eval { while () { -# &{&_pool_1 or &terminate}; # crashes, would be ~5% faster - $cb = &_pool_1 - or &terminate; + _pool_1 $cb; &$cb; - undef $cb; - &terminate if &_pool_2; + _pool_2 $cb; &schedule; } }; + last if $@ eq "\3terminate\2\n"; warn $@ if $@; } }