]> git.vpit.fr Git - perl/modules/Thread-Cleanup.git/blob - README
Remove trailing whitespace
[perl/modules/Thread-Cleanup.git] / README
1 NAME
2     Thread::Cleanup - Hook thread destruction.
3
4 VERSION
5     Version 0.04
6
7 SYNOPSIS
8         use Thread::Cleanup;
9
10         use threads;
11
12         Thread::Cleanup::register {
13          my $tid = threads->tid();
14          warn "Thread $tid finished\n";
15         };
16
17 DESCRIPTION
18     This module allows you to hook thread destruction without fiddling with
19     the internals of threads.
20
21     It acts globally on all the threads that may spawn anywhere in your
22     program, with the exception of the main thread.
23
24 FUNCTIONS
25   "register BLOCK"
26     Specify that the "BLOCK" will have to be called (in void context,
27     without arguments) every time a thread finishes its job. More precisely,
28
29     *   it will always be called before the joining for joined threads ;
30
31     *   it will be called for detached threads if and only if they terminate
32         before the main thread, and the hook will then fire at "END" time ;
33
34     *   it won't trigger for the destruction of the main thread.
35
36 EXPORT
37     None.
38
39 DEPENDENCIES
40     perl 5.8.
41
42     threads 1.07.
43
44     XSLoader.
45
46 AUTHOR
47     Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
48
49 BUGS
50     Please report any bugs or feature requests to "bug-thread-cleanup at
51     rt.cpan.org", or through the web interface at
52     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Thread-Cleanup>. I will
53     be notified, and then you'll automatically be notified of progress on
54     your bug as I make changes.
55
56 SUPPORT
57     You can find documentation for this module with the perldoc command.
58
59         perldoc Thread::Cleanup
60
61 ACKNOWLEDGEMENTS
62     Inspired by a question from TonyC on #p5p.
63
64 COPYRIGHT & LICENSE
65     Copyright 2009,2010 Vincent Pit, all rights reserved.
66
67     This program is free software; you can redistribute it and/or modify it
68     under the same terms as Perl itself.
69