--- Coro/Coro.pm 2001/07/28 01:41:57 1.27 +++ Coro/Coro.pm 2001/08/10 21:03:40 1.28 @@ -192,10 +192,9 @@ =cut sub terminate { - push @destroy, $current; - $manager->ready; + $current->cancel; &schedule; - # NORETURN + die; # NORETURN } =back @@ -240,6 +239,17 @@ push @ready, $_[0]; } +=item $process->cancel + +Like C, but terminates the specified process instead. + +=cut + +sub cancel { + push @destroy, $_[0]; + $manager->ready; +} + =back =cut