--- Coro/Coro.pm 2007/02/28 11:43:03 1.115 +++ Coro/Coro.pm 2007/03/28 14:24:17 1.119 @@ -52,7 +52,7 @@ our $main; # main coroutine our $current; # current coroutine -our $VERSION = '3.501'; +our $VERSION = '3.55'; our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); our %EXPORT_TAGS = ( @@ -244,6 +244,7 @@ last if @pool >= $POOL_SIZE; push @pool, $current; + $current->save (Coro::State::SAVE_DEF); $current->prio (0); schedule; } @@ -467,7 +468,7 @@ =item my $guard = Coro::guard { ... } -This creates and returns a guard object. Nothing happens until the objetc +This creates and returns a guard object. Nothing happens until the object gets destroyed, in which case the codeblock given as argument will be executed. This is useful to free locks or other resources in case of a runtime error or when the coroutine gets canceled, as in both cases the