ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro.pm
(Generate patch)

Comparing Coro/Coro.pm (file contents):
Revision 1.295 by root, Tue May 10 19:55:48 2011 UTC vs.
Revision 1.296 by root, Thu May 12 23:24:28 2011 UTC

856from multiple threads, and all will be resumed and given the status 856from multiple threads, and all will be resumed and given the status
857return once the C<$coro> terminates. 857return once the C<$coro> terminates.
858 858
859=cut 859=cut
860 860
861sub join { 861sub 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
885There can be any number of C<on_destroy> callbacks per coro, and there is 885There can be any number of C<on_destroy> callbacks per coro, and there is
886no way currently to remove a callback once added. 886no way currently to remove a callback once added.
887 887
888=cut 888=cut
889 889
890sub on_destroy { 890sub 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
1171future to allow per-thread schedulers, but Coro::State does not yet allow 1171future to allow per-thread schedulers, but Coro::State does not yet allow
1172this). I recommend disabling thread support and using processes, as having 1172this). I recommend disabling thread support and using processes, as having
1173the windows process emulation enabled under unix roughly halves perl 1173the windows process emulation enabled under unix roughly halves perl
1174performance, even when not used. 1174performance, even when not used.
1175 1175
1176Attempts 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
1178You must not switch to another coro from within a signal handler (only 1181You must not switch to another coro from within a signal handler (only
1179relevant with %SIG - most event libraries provide safe signals), I<unless> 1182relevant with %SIG - most event libraries provide safe signals), I<unless>
1180you are sure you are not interrupting a Coro function. 1183you are sure you are not interrupting a Coro function.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines