develooper Front page | perl.perl5.porters | Postings from March 2018

Re: [perl #133021] Removed the word "discouraged" from threads'documentation

Thread Previous | Thread Next
Rocco Caputo
March 27, 2018 14:33
Re: [perl #133021] Removed the word "discouraged" from threads'documentation
Message ID:
> On Mar 27, 2018, at 07:15, Dave Mitchell <> wrote:
> On Mon, Mar 26, 2018 at 07:20:29PM -0600, Karl Williamson wrote:
>> On 03/26/2018 06:54 PM, Jerry D. Hedden via RT wrote:
>>> I feel that, while the wording of the POD notice is reasonable, the WARNING heading is alarmist.  I feel strongly that the heading should be changed to NOTICE, and the word 'discouraged' be changed to 'not recommended' (as per the original poster's patch).

I started the discussion that led to the addition of the discouragement warning.  Its original purpose was to manage users' expectations of the kind of help they'd get from the larger Perl community for trying to use this feature.

Toning down the notice doesn't break its original purpose.

>> I agree with the above.  And I really don't like 'not recommended' as I
>> think it is too strong.  Maybe just list the problems

Getting rid of the notice entirely would resume failing to manage users' expectations.

In case someone on-list isn't aware of the advice given off-list, I'm closing with a small list of quotes from freenode #perl.  These are pieces of real advice given to Perl users looking for help using threads.  Some of you may recognize things you've said.

Some of you may be tempted to say that IRC isn't representative of a larger perl community, but many of the vocal opponents on IRC also participate in other areas.  They use and advocate Perl professionally.  They attend or speak at Perl conferences.  They are perl5 porters.

This list includes both old and recent statements:

don't use threads

When someone says "I need to use threads" in perl, they (99.9% of the time) mean "I don't know what I'm talking about, please (re-)educate me"

But at least you didn't start out trying to use threads.

Yes.. Don't use threads. At all.

The simple answer is "don't use threads." Just fork if you must.

no, because threads are usually a stupid answer.

do not use threads.

'use threads' is "please let me use the windows fork hack code"

also, don't use threads in Perl; if your problem requires threads, don't use Perl

you seem to have missed the point earlier that was made about "dont use threads"

the thread lecture is don't use threads in Perl, or don't use Perl

before anything else, notice that people here will start telling you about how you probably shouldn't use threads in Perl.

Hi. Please don't use threads.

I wonder how many times we've told qubit not to use threads and how mayn times they've ignored us.

Because threads are not what you want. Threads in Perl, doubly so

(Almost) Everyone who wants to use threads in perl understands them incorrectly.

very few professional perl devs will use threads for real code

because threads are a stupid way to do concurrency in perl.

I really wish there was this little genie like the little green dude in The Flintstones that would pop up and educate people when they think they want to use threads in perl.

Don't use threads, would be our suggestion

If you want to wrap your head in crazy concurrency bugs and random failures, then use threads.

Suggestion: don't use threads

don't use threads in Perl

perlbot: threads is Friends don't let friends use threads ; Elizabeth on Threads -

basically: stop trying to use threads.

and really you don't want to use threads at all

or you can use threads, and we will ignore you when it all breaks.

step 1: don't use threads

The response is don't use threads

never use threads in perl

So then they're always asking "how can I do threads" and we say "don't use threads" and they complain and say "waaaaa I need them for doing lots of things at once" and then we say "no you dno't, you can do other things".. and they give a look of complete utter confusion.

yes but in your case it is because threads are known to be broken and so will cause you problems

First convince your department not to use threads.

I don't imagine you'll get much help.. Our advice is "don't use threads"... hardly anyone here does much if anything with threads.. So likely nobody here really knows

This may be the definitive idea of why allowing people to use threads is a bad idea.

you should not use threads.

don't use threads. problem solved.

don't use threads is the answer

You don't want to use threads.

ah, the truth "I use threads because I'm too dumb to understand select"

But if you're wanting to use threads, odds are you are doing something wrong :)

the answer is invariably "don't use threads"    :)

ah, well, your first mistake was to actually seriously use threads in Perl

look, we can't actually advise you on a concurrency solution unless you tell us what the program's going to do - although the odds are pretty good that we'll say "don't use threads" since that's almost always the worst choice

code containing 'use Switch' or 'use threads' can be assumed to be broken

the best advice I can give is to not use threads in Perl

some idiot did 'use threads;' and now you have a broken program that needs replacing


also, #perl will almost always refuse to help with threads. because threads in perl are shit.

Rocco Caputo <>

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