@@ -40,11+40,16 @@ This module allows you to hook thread destruction without fiddling with the inte
It acts globally on all the threads that may spawn anywhere in your program, with the exception of the main thread.
It acts globally on all the threads that may spawn anywhere in your program, with the exception of the main thread.
+The hook will also be called when pseudo-forks (i.e. processes spawn on Windows for the C<fork> emulation) terminate.
+
=head1 FUNCTIONS
=head1 FUNCTIONS
-=head2 C<register BLOCK>
+=head2 C<register>
+
+ register { ... };
+ ®ister($coderef);
-Specify that the C<BLOCK> will have to be called (in void context, without arguments) every time a thread finishes its job.
+Specify that the given block or code reference C<$coderef> will have to be called (in void context, without arguments) every time a thread finishes its job.