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

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

Thread Previous | Thread Next
From:
Karl Williamson
Date:
March 27, 2018 01:21
Subject:
Re: [perl #133021] Removed the word "discouraged" from threads'documentation
Message ID:
53aeea92-a364-4d6f-9852-8975f861f665@khwilliamson.com
On 03/26/2018 06:54 PM, Jerry D. Hedden via RT wrote:
> As one of several people who have maintained the various threads modules over the years, I regret that I missed being part of the original discussion that lead to the inclusion of the 'discouraged' message.
> 
> The fact is that threads work, they are maintained, and they currently do not have any bugs preventing their use.  I acknowledge that not all Perl modules are thread-safe, but there is sufficient documentation to that affect in the POD.
> 
> I also acknowledge that the threads implementation is not ideal nor optimal.  Nonetheless, threads are useful, and are being used in the wild.  (I, for one, have even used them to good effect in production code.  <Gasp!>)  Yes, if you don't know what you're doing, threads can be problematic.  ("There be dragons...," and all that.)  However, the same can be argued to greater or lesser degrees of any programming language feature in the hands of unsophisticated users.
> 
> 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).
> 
> Since the addition of the 'discouraged' message, I have received several emails from professional Perl developers from around the world expressing concern about it.  I expressed to them the same opinions I have given above, namely that threads work (but you have to know what you're doing), and that threads have not been deprecated.
> 
> I'm not trying to convert anyone who doesn't like "interpreter-based threads".  Don't use them as you so choose.  After all, Perl has always been about options.  However, there ARE Perl developers that do feel they are a VERY useful feature.
> 
> Just my two cents.
> 

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

Even a 30% slowdown will be fully acceptable if you can divide the work 
up into 8 or 16 parallel pieces.  The gain far outweighs the cost.

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