Commit | Line | Data |
---|---|---|
2605996a JH |
1 | =head1 NAME |
2 | ||
3 | perlthrtut - tutorial on threads in Perl | |
4 | ||
5 | =head1 DESCRIPTION | |
6 | ||
53d7eaa8 JH |
7 | B<NOTE>: this tutorial describes the new Perl threading flavour |
8 | introduced in Perl 5.6.0 called interpreter threads, or ithreads | |
9 | for short. There is another older perl threading flavour called | |
10 | the 5.005 model, unsurprisingly for 5.005 versions of Perl. | |
2a4bf773 | 11 | |
53d7eaa8 JH |
12 | You can see which (or neither) threading flavour you have by |
13 | running C<perl -V> and look at the C<Platform> section. | |
14 | If you have C<useithreads=define> you have ithreads, if you | |
15 | have C<use5005threads=define> you have 5.005 threads. | |
16 | If you have neither, you don't have any thread support built in. | |
17 | If you have both, you are in trouble. | |
2605996a | 18 | |
53d7eaa8 | 19 | This document is unfortunately rather sparse as of 2001-Sep-17. |
2605996a | 20 | |
53d7eaa8 JH |
21 | In the meanwhile, you can read up on threading basics (while keeping |
22 | in mind the above caveat about the changing threading flavours) in | |
23 | L<perlothrtut> | |
2605996a JH |
24 | |
25 | =over 4 | |
26 | ||
53d7eaa8 | 27 | =item * |
2605996a | 28 | |
53d7eaa8 | 29 | L<perlothrtut/What Is A Thread Anyway?> |
2605996a | 30 | |
53d7eaa8 | 31 | =item * |
2605996a | 32 | |
53d7eaa8 | 33 | L<perlothrtut/Threaded Program Models> |
2605996a | 34 | |
53d7eaa8 | 35 | =item * |
2605996a | 36 | |
53d7eaa8 | 37 | L<perlothrtut/Native threads> |
2605996a | 38 | |
53d7eaa8 | 39 | =item * |
2605996a | 40 | |
53d7eaa8 | 41 | L<perlothrtut/What kind of threads are perl threads?> |
2605996a | 42 | |
2605996a | 43 | |
53d7eaa8 | 44 | =item * |
2605996a | 45 | |
53d7eaa8 | 46 | L<perlothrtut/Threadsafe Modules> |
2605996a JH |
47 | |
48 | =back | |
49 | ||
53d7eaa8 JH |
50 | When C<perlothrut> reaches L<perlothrtut/Thread Basics> is when |
51 | you should slow down and remember to mentally read C<threads> | |
52 | when C<perlothrtut> says C<Thread>. The C<Thread> was the old | |
53 | 5.005-style threading module, the C<threads> is the new ithreads | |
54 | style threading module. | |
2605996a | 55 | |
53d7eaa8 | 56 | For more information please see L<threads> and L<threads::shared>. |
2605996a | 57 |