… | |
… | |
371 | See C<async> and C<Coro::State::new> for additional info about the |
371 | See C<async> and C<Coro::State::new> for additional info about the |
372 | coroutine environment. |
372 | coroutine environment. |
373 | |
373 | |
374 | =cut |
374 | =cut |
375 | |
375 | |
376 | sub _run_coro { |
376 | sub _terminate { |
377 | terminate &{+shift}; |
377 | terminate &{+shift}; |
378 | } |
|
|
379 | |
|
|
380 | sub new { |
|
|
381 | my $class = shift; |
|
|
382 | |
|
|
383 | $class->SUPER::new (\&_run_coro, @_) |
|
|
384 | } |
378 | } |
385 | |
379 | |
386 | =item $success = $coroutine->ready |
380 | =item $success = $coroutine->ready |
387 | |
381 | |
388 | Put the given coroutine into the end of its ready queue (there is one |
382 | Put the given coroutine into the end of its ready queue (there is one |