Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Trying to Understand the Discouragement of Threads

by benwills (Sexton)
on Nov 18, 2014 at 07:24 UTC ( #1107543=note: print w/replies, xml ) Need Help??


in reply to Re^3: Trying to Understand the Discouragement of Threads
in thread Trying to Understand the Discouragement of Threads

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.

  • Comment on Re^4: Trying to Understand the Discouragement of Threads

Replies are listed 'Best First'.
Re^5: Trying to Understand the Discouragement of Threads
by tobyink (Canon) on Nov 18, 2014 at 09:36 UTC

    "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."

    Although the Perl documentation now discourages using threads for a variety of vague reasons, do note that the word discouraged was carefully chosen. In particular, the word deprecated was explicitly not used.

    There are no plans to remove thread support from Perl in the foreseeable future.

      I've run into exactly that issue and asked in the Chatterbox where I was given a short explanation and a pointer to this discussion.

      I object about "discouraged" being a wise choice. IMO this discourages the not-so-newbies who know about perlpolicy and how to interpret it. If anything, newbies probably give less weight to it (out of sheer ignorance) or (willingly) do not care about potential long-term consequences.

      Having been burnt by the given-when deprecation fiasco, I was quite repelled by the mention of "officially discouraged" in threads and now I come to know that this particular formulation is just smoke and mirrors to repel "annoying newbies".

      Not good.

      Bye
       PetaMem
          All Perl:   MT, NLP, NLU

Re^5: Trying to Understand the Discouragement of Threads: problem type zero
by Discipulus (Abbot) on Nov 18, 2014 at 07:52 UTC
    Before continue be sure to read The problem with "The Problem with Threads" then because we have good thread safe monks here around search for them.

    HtH
    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^5: Trying to Understand the Discouragement of Threads
by Anonymous Monk on Nov 18, 2014 at 07:28 UTC

      Interesting. If it's because they're harder and more confusing than other solutions, that's unfortunate they would respond they way they did. Especially because, if you follow the link to what "discouraged" means, it says:

      "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.

      When I read that, it sounded to me like threads were possibly going to be making an exit from perl. If they had said "look...these are hard to do well," it could have saved me a lot of confusion and running around. I think I also don't understand why the time and energy that goes into that whole process of getting that into the documentation doesn't go to better informing and teaching others the best/right way to use them if they are, in fact, often the better solution. But I guess that's a philosophical difference.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-08-12 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?