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

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

Thread Previous | Thread Next
From:
Eric Brine
Date:
May 10, 2016 20:22
Subject:
Re: [perl #125106] Why are threads discouraged?
Message ID:
CALJW-qGC-bifBp=k9XEcd_GVw4_X0MUM6Ps5tAC+M9tztKRgzA@mail.gmail.com
On Tue, May 5, 2015 at 1:49 PM, Rocco Caputo <rcaputo@pobox.com> wrote:

> > On May 5, 2015, at 11:23, Eric Brine <perlbug-followup@perl.org> 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: https://rt.perl.org/Ticket/Display.html?id=125106 >
> >
> >
> > threads.pm 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.
>

One might think that, except that the word "discouraged" is linked to a
definition that means something quite different than "not to be used
without understanding what it means that Perl threads are heavy". It
actually defines "discouraged" as "we'd like to get rid of them, but we're
not doing it now"

   - *discouraged*

   From time to time, we may mark language constructs and features which we
   consider to have been mistakes as *discouraged*. Discouraged features
   aren't currently candidates for removal, but we may later deprecate them if
   they're found to stand in the way of a significant improvement to the Perl
   core.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About