--- cvsroot/Coro/Coro.pm 2008/11/20 06:32:55 1.229 +++ cvsroot/Coro/Coro.pm 2008/11/20 07:02:43 1.230 @@ -137,18 +137,6 @@ Carp::croak ("FATAL: deadlock detected"); }; -sub _cancel { - my ($self) = @_; - - # free coroutine data and mark as destructed - $self->_destroy - or return; - - # call all destruction callbacks - $_->(@{$self->{_status}}) - for @{ delete $self->{_on_destroy} || [] }; -} - # this coroutine is necessary because a coroutine # cannot destroy itself. our @destroy; @@ -156,7 +144,7 @@ $manager = new Coro sub { while () { - (shift @destroy)->_cancel + Coro::_cancel shift @destroy while @destroy; &schedule; @@ -321,13 +309,6 @@ =cut -sub terminate { - $current->{_status} = [@_]; - push @destroy, $current; - $manager->ready; - do { &schedule } while 1; -} - sub killall { for (Coro::State::list) { $_->cancel