… | |
… | |
856 | from multiple threads, and all will be resumed and given the status |
856 | from multiple threads, and all will be resumed and given the status |
857 | return once the C<$coro> terminates. |
857 | return once the C<$coro> terminates. |
858 | |
858 | |
859 | =cut |
859 | =cut |
860 | |
860 | |
861 | sub join { |
861 | sub xjoin { |
862 | my $self = shift; |
862 | my $self = shift; |
863 | |
863 | |
864 | unless ($self->{_status}) { |
864 | unless ($self->{_status}) { |
865 | my $current = $current; |
865 | my $current = $current; |
866 | |
866 | |
… | |
… | |
885 | There can be any number of C<on_destroy> callbacks per coro, and there is |
885 | There can be any number of C<on_destroy> callbacks per coro, and there is |
886 | no way currently to remove a callback once added. |
886 | no way currently to remove a callback once added. |
887 | |
887 | |
888 | =cut |
888 | =cut |
889 | |
889 | |
890 | sub on_destroy { |
890 | sub xon_destroy { |
891 | my ($self, $cb) = @_; |
891 | my ($self, $cb) = @_; |
892 | |
892 | |
893 | push @{ $self->{_on_destroy} }, $cb; |
893 | push @{ $self->{_on_destroy} }, $cb; |
894 | } |
894 | } |
895 | |
895 | |
… | |
… | |
1171 | future to allow per-thread schedulers, but Coro::State does not yet allow |
1171 | future to allow per-thread schedulers, but Coro::State does not yet allow |
1172 | this). I recommend disabling thread support and using processes, as having |
1172 | this). I recommend disabling thread support and using processes, as having |
1173 | the windows process emulation enabled under unix roughly halves perl |
1173 | the windows process emulation enabled under unix roughly halves perl |
1174 | performance, even when not used. |
1174 | performance, even when not used. |
1175 | |
1175 | |
|
|
1176 | Attempts to use threads created in another emulated process will crash |
|
|
1177 | ("cleanly", with a null pointer exception). |
|
|
1178 | |
1176 | =item coro switching is not signal safe |
1179 | =item coro switching is not signal safe |
1177 | |
1180 | |
1178 | You must not switch to another coro from within a signal handler (only |
1181 | You must not switch to another coro from within a signal handler (only |
1179 | relevant with %SIG - most event libraries provide safe signals), I<unless> |
1182 | relevant with %SIG - most event libraries provide safe signals), I<unless> |
1180 | you are sure you are not interrupting a Coro function. |
1183 | you are sure you are not interrupting a Coro function. |