develooper Front page | perl.perl5.porters | Postings from May 2015

Re: [perl #125106] Why are threads discouraged?

Thread Previous | Thread Next
Rocco Caputo
May 5, 2015 17:50
Re: [perl #125106] Why are threads discouraged?
Message ID:
> On May 5, 2015, at 11:23, Eric Brine <> wrote:
> # New Ticket Created by  "Eric Brine" 
> # Please include the string:  [perl #125106]
> # in the subject line of all future correspondence about this issue. 
> # <URL: >
> says:
> The use of interpreter-based threads in perl is officially discouraged.
> Why is that? Is it just because they're rather heavy? If so, why not just
> say so and let the user decide whether he wants to use them or not? After
> all, heavy threads aren't a problem if you reuse them (as in a worker
> model).

If your documentation is anything like mine, the paragraph before that statement tries to explain why.  Perhaps the discouragement should begin with "Because of this, the use of...." to hint that the reader may have skipped something important and to discourage people from taking a provocative statement out of context.

The discouragement was added on Mar 2, 2014 after an intense deliberation on perl5-porters:

"RFC: add discouragement warning to perl threads documentation"

The RFC was a product of an observation in #p5p that most people in the Perl community, when asked for help with threads in Perl, will harshly denounce their viability and recommend that the problematic program be gutted and rewritten with almost anything but.

The #p5p IRC discussion began on Feb 19, 2014, with "Perl's threads are socially weird.  They exist and are supported, but they (and their users) are heavily deprecated in the community."

Or it began with an observation about 90 minutes earlier in a #p5p discussion with/about a Perl novice:

right, because most channels don't answers threads questions
because most channels are full of people who don't use
because 'use threads;' almost always indicates brain damage

Rocco Caputo <>
Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About