--- Coro/Coro.pm 2006/11/01 01:21:21 1.78 +++ Coro/Coro.pm 2006/11/24 11:36:57 1.81 @@ -43,7 +43,7 @@ our $main; # main coroutine our $current; # current coroutine -our $VERSION = '2.1'; +our $VERSION = '2.5'; our @EXPORT = qw(async cede schedule terminate current); our %EXPORT_TAGS = ( @@ -165,6 +165,9 @@ (usually unused). When the sub returns the new process is automatically terminated. +When the coroutine dies, the program will exit, just as in the main +program. + # create a new coroutine that just prints its arguments async { print "@_\n"; @@ -231,7 +234,7 @@ sub new { my $class = shift; bless { - _coro_state => (new Coro::State $_[0] && \&_newcoro, @_), + _coro_state => (new Coro::State \&_newcoro, @_), }, $class; } @@ -243,7 +246,7 @@ =item $process->cancel (arg...) -Temrinates the given process and makes it return the given arguments as +Terminates the given process and makes it return the given arguments as status (default: the empty list). =cut