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