This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bad \[...] prototype checking
[perl5.git] / pod / perlthrtut.pod
1 =head1 NAME
2
3 perlthrtut - tutorial on threads in Perl
4
5 =head1 DESCRIPTION
6
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.
11
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.
18
19 This document is unfortunately rather sparse as of 2001-Sep-17.
20
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>
24
25 =over 4
26
27 =item *
28
29 L<perlothrtut/What Is A Thread Anyway?>
30
31 =item *
32
33 L<perlothrtut/Threaded Program Models>
34
35 =item *
36
37 L<perlothrtut/Native threads>
38
39 =item *
40
41 L<perlothrtut/What kind of threads are perl threads?>
42
43
44 =item *
45
46 L<perlothrtut/Threadsafe Modules>
47
48 =back
49
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.
55
56 For more information please see L<threads> and L<threads::shared>.
57