Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I can only speak for myself but I really dislike Perl threads for two reasons:

  1. Data is NOT shared between threads unless you go to extreme lengths to share them. For large complex data structures you'll save yourself a lot of time if you just go with fork() and some sort of inter-process communication instead because it'll be far easier to debug. For me, this goes against the whole point of threads. Compare and contrast with Java threads, about the only thing in Java that actually works exactly as you would expect. You even get a hash class that automagically takes care of locking issues for you, how neat is that?
  2. Too many of the really useful modules on CPAN will just blow up in your face if you try to use them with threads. To work around those issues, threaded scripts have to jump so many hoops you end up losing sight of whatever advantage threads were supposed to give you in the first place.
Talking about threads in Perl makes me sad because it's the one thing I really don't like about my favorite language.

-- FloydATC

Time flies when you don't know what you're doing


In reply to Re: Trying to Understand the Discouragement of Threads by FloydATC
in thread Trying to Understand the Discouragement of Threads by benwills

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found