I can only speak for myself but I really dislike Perl threads for two reasons:
- 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?
- 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
-
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.
|