… | |
… | |
50 | |
50 | |
51 | our $idle; # idle handler |
51 | our $idle; # idle handler |
52 | our $main; # main coroutine |
52 | our $main; # main coroutine |
53 | our $current; # current coroutine |
53 | our $current; # current coroutine |
54 | |
54 | |
55 | our $VERSION = '3.8'; |
55 | our $VERSION = '4.0'; |
56 | |
56 | |
57 | our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); |
57 | our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub); |
58 | our %EXPORT_TAGS = ( |
58 | our %EXPORT_TAGS = ( |
59 | prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], |
59 | prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], |
60 | ); |
60 | ); |
… | |
… | |
392 | } |
392 | } |
393 | |
393 | |
394 | =item $coroutine->join |
394 | =item $coroutine->join |
395 | |
395 | |
396 | Wait until the coroutine terminates and return any values given to the |
396 | Wait until the coroutine terminates and return any values given to the |
397 | C<terminate> or C<cancel> functions. C<join> can be called multiple times |
397 | C<terminate> or C<cancel> functions. C<join> can be called concurrently |
398 | from multiple coroutine. |
398 | from multiple coroutines. |
399 | |
399 | |
400 | =cut |
400 | =cut |
401 | |
401 | |
402 | sub join { |
402 | sub join { |
403 | my $self = shift; |
403 | my $self = shift; |