Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Trying to Understand the Discouragement of Threads

by syphilis (Archbishop)
on Nov 18, 2014 at 06:52 UTC ( [id://1107537]=note: print w/replies, xml ) Need Help??


in reply to Trying to Understand the Discouragement of Threads

So: why such severe discouragement?

Could you cite some examples of this discouragement ? Is it coming from those who know how to utilise threading, or is it merely coming from those who don't ?

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Trying to Understand the Discouragement of Threads
by benwills (Sexton) on Nov 18, 2014 at 07:08 UTC

    Sure. The perl documentation, for example: http://perldoc.perl.org/threads.html

    The "interpreter-based threads" provided by Perl are not the fast, lightweight system for multitasking that one might expect or hope for. Threads are implemented in a way that make them easy to misuse. Few people know how to use them correctly or will be able to provide help. The use of interpreter-based threads in perl is officially discouraged.

    And it seems like most of the posts or suggestions to use threads (that I've come across) are often countered saying that threads shouldn't be used, are heavier, more confusing, etc. If you'd like references, I can go pull some up from links I've saved.

      The use of interpreter-based threads in perl is officially discouraged

      I seem to recall that I've seen others making reference to that statement, too.
      I think that you (or at least someone who cares about threads) should challenge that remark with p5p by filing a perlbug report that requests a "please explain the reason that remark is there".
      You should point out that, IYO, threads is a useful and important part of perl and that discouraging people from using it is stupid, counter-productive and plain wrong ... or whatever words you choose to make your point :-)

      At worst they can only decide to reject your bug report and close it without taking any action.

      Cheers,
      Rob

      And it seems like most of the posts or suggestions to use threads (that I've come across) are often countered saying that threads shouldn't be used, are heavier, more confusing, etc.,

      Well not on perlmonks ;) I've only seen it twice, and its just someone quoting form the BS discouragement docs without any understanding ... fork doesn't work on windows, threads work

        Well, to be honest, perlmonks was consistently the highest-quality source for me in getting this thing made. But it sounds like you might have expected that. ;)

        I think my question/curiosity might be coming from not understanding who to listen to...and I would see posts with clear thread solutions, where someone would often chime in suggesting using another package. Then I'd run of to test that and, every time, would be disappointed by the performance of the non-thread suggestion. Combined with the "official" discouragement, it makes me wonder if there's a shorter shelf life for my code and if maybe I'm was just missing something.

Re^2: Trying to Understand the Discouragement of Threads
by Anonymous Monk on Nov 18, 2014 at 07:07 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1107537]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-28 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found