… | |
… | |
41 | |
41 | |
42 | our $idle; # idle coroutine |
42 | our $idle; # idle coroutine |
43 | our $main; # main coroutine |
43 | our $main; # main coroutine |
44 | our $current; # current coroutine |
44 | our $current; # current coroutine |
45 | |
45 | |
46 | our $VERSION = '2.1'; |
46 | our $VERSION = '2.5'; |
47 | |
47 | |
48 | our @EXPORT = qw(async cede schedule terminate current); |
48 | our @EXPORT = qw(async cede schedule terminate current); |
49 | our %EXPORT_TAGS = ( |
49 | our %EXPORT_TAGS = ( |
50 | prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], |
50 | prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], |
51 | ); |
51 | ); |
… | |
… | |
232 | } |
232 | } |
233 | |
233 | |
234 | sub new { |
234 | sub new { |
235 | my $class = shift; |
235 | my $class = shift; |
236 | bless { |
236 | bless { |
237 | _coro_state => (new Coro::State $_[0] && \&_newcoro, @_), |
237 | _coro_state => (new Coro::State \&_newcoro, @_), |
238 | }, $class; |
238 | }, $class; |
239 | } |
239 | } |
240 | |
240 | |
241 | =item $process->ready |
241 | =item $process->ready |
242 | |
242 | |