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

Comparing Coro/Coro.pm (file contents):
Revision 1.292 by root, Sat Apr 30 05:17:42 2011 UTC vs.
Revision 1.293 by root, Sat Apr 30 05:20:03 2011 UTC

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