… | |
… | |
81 | |
81 | |
82 | our $idle; # idle handler |
82 | our $idle; # idle handler |
83 | our $main; # main coro |
83 | our $main; # main coro |
84 | our $current; # current coro |
84 | our $current; # current coro |
85 | |
85 | |
86 | our $VERSION = 5.2; |
86 | our $VERSION = 5.21; |
87 | |
87 | |
88 | our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub rouse_cb rouse_wait); |
88 | our @EXPORT = qw(async async_pool cede schedule terminate current unblock_sub rouse_cb rouse_wait); |
89 | our %EXPORT_TAGS = ( |
89 | our %EXPORT_TAGS = ( |
90 | prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], |
90 | prio => [qw(PRIO_MAX PRIO_HIGH PRIO_NORMAL PRIO_LOW PRIO_IDLE PRIO_MIN)], |
91 | ); |
91 | ); |
… | |
… | |
830 | the windows process emulation enabled under unix roughly halves perl |
830 | the windows process emulation enabled under unix roughly halves perl |
831 | performance, even when not used. |
831 | performance, even when not used. |
832 | |
832 | |
833 | =item coro switching is not signal safe |
833 | =item coro switching is not signal safe |
834 | |
834 | |
835 | You must not switch to another coro from within a signal handler |
835 | You must not switch to another coro from within a signal handler (only |
836 | (only relevant with %SIG - most event libraries provide safe signals). |
836 | relevant with %SIG - most event libraries provide safe signals), I<unless> |
|
|
837 | you are sure you are not interrupting a Coro function. |
837 | |
838 | |
838 | That means you I<MUST NOT> call any function that might "block" the |
839 | That means you I<MUST NOT> call any function that might "block" the |
839 | current coro - C<cede>, C<schedule> C<< Coro::Semaphore->down >> or |
840 | current coro - C<cede>, C<schedule> C<< Coro::Semaphore->down >> or |
840 | anything that calls those. Everything else, including calling C<ready>, |
841 | anything that calls those. Everything else, including calling C<ready>, |
841 | works. |
842 | works. |