--- Coro/Coro.pm 2006/11/25 00:56:35 1.85 +++ Coro/Coro.pm 2006/11/26 02:54:55 1.88 @@ -43,7 +43,7 @@ our $main; # main coroutine our $current; # current coroutine -our $VERSION = '2.5'; +our $VERSION = '3.0'; our @EXPORT = qw(async cede schedule terminate current); our %EXPORT_TAGS = ( @@ -135,8 +135,7 @@ # this coroutine is necessary because a coroutine # cannot destroy itself. my @destroy; -my $manager; -$manager = new Coro sub { +my $manager; $manager = new Coro sub { while () { # by overwriting the state object with the manager we destroy it # while still being able to schedule this coroutine (in case it has @@ -236,9 +235,6 @@ =cut sub _new_coro { - $current->_clear_idle_sp; # set the idle sp on the following cede - _set_cede_self; # ensures that cede cede's us first - cede; terminate &{+shift}; }