… | |
… | |
31 | important global variables. |
31 | important global variables. |
32 | |
32 | |
33 | =cut |
33 | =cut |
34 | |
34 | |
35 | package Coro; |
35 | package Coro; |
|
|
36 | |
|
|
37 | no warnings qw(uninitialized); |
36 | |
38 | |
37 | use Coro::State; |
39 | use Coro::State; |
38 | |
40 | |
39 | use base Exporter; |
41 | use base Exporter; |
40 | |
42 | |
… | |
… | |
229 | =cut |
231 | =cut |
230 | |
232 | |
231 | sub cancel { |
233 | sub cancel { |
232 | push @destroy, $_[0]; |
234 | push @destroy, $_[0]; |
233 | $manager->ready; |
235 | $manager->ready; |
|
|
236 | &schedule if $current == $_[0]; |
234 | } |
237 | } |
235 | |
238 | |
236 | =item $oldprio = $process->prio($newprio) |
239 | =item $oldprio = $process->prio($newprio) |
237 | |
240 | |
238 | Sets the priority of the process. Higher priority processes get run before |
241 | Sets the priority of the process. Higher priority processes get run before |