Threads

Perl 5.6 and later also include native multithreading capability, which is distributed with Perl as a set of modules. The threads modules have improved since the 5.005 release, but should still be considered an experimental feature and aren’t automatically compiled in with Perl.

Warning

Pay close attention to Configure when you build Perl so that you don’t include threads support if you don’t want it.

You might want to build a separate version of Perl with threads enabled, if you’d like to test the threads feature under your platform.

Chapter 8 describes the individual thread modules. For information on using threads, refer to the perlthrtut manpage (included with more recent distributions of Perl).

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.