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

Comparing cvsroot/Coro/Coro.pm (file contents):
Revision 1.291 by root, Fri Apr 29 15:43:26 2011 UTC vs.
Revision 1.293 by root, Sat Apr 30 05:20:03 2011 UTC

788 788
789=item $coro->join 789=item $coro->join
790 790
791Wait until the coro terminates and return any values given to the 791Wait until the coro terminates and return any values given to the
792C<terminate> or C<cancel> functions. C<join> can be called concurrently 792C<terminate> or C<cancel> functions. C<join> can be called concurrently
793from multiple coro, and all will be resumed and given the status 793from multiple threads, and all will be resumed and given the status
794return once the C<$coro> terminates. 794return once the C<$coro> terminates.
795 795
796=cut 796=cut
797 797
798sub join { 798sub join {
813} 813}
814 814
815=item $coro->on_destroy (\&cb) 815=item $coro->on_destroy (\&cb)
816 816
817Registers a callback that is called when this coro thread gets destroyed, 817Registers a callback that is called when this coro thread gets destroyed,
818but before it is joined. The callback gets passed the terminate arguments, 818that is, after it's resources have been freed but before it is joined. The
819callback gets passed the terminate/cancel arguments, if any, and I<must
819if any, and I<must not> die, under any circumstances. 820not> die, under any circumstances.
820 821
821There can be any number of C<on_destroy> callbacks per coro. 822There can be any number of C<on_destroy> callbacks per coro, and there is
823no way currently to remove a callback once added.
822 824
823=cut 825=cut
824 826
825sub on_destroy { 827sub on_destroy {
826 my ($self, $cb) = @_; 828 my ($self, $cb) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines