--- cvsroot/Coro/README 2013/03/06 06:00:08 1.32 +++ cvsroot/Coro/README 2014/03/04 06:13:24 1.33 @@ -551,14 +551,14 @@ $SIG{VTALRM} = sub { cede }; # and then start the interval timer Time::HiRes::setitimer &Time::HiRes::ITIMER_VIRTUAL, 0.01, 0.01; - }; + }; Coro::on_leave { # on leaving the thread, we stop the interval timer again Time::HiRes::setitimer &Time::HiRes::ITIMER_VIRTUAL, 0, 0; - }; + }; &{+shift}; - } + } # use like this: timeslice { @@ -780,7 +780,7 @@ arguments, if any, and *must not* die, under any circumstances. There can be any number of "on_destroy" callbacks per coro, and - there is no way currently to remove a callback once added. + there is currently no way to remove a callback once added. $oldprio = $coro->prio ($newprio) Sets (or gets, if the argument is missing) the priority of the coro