I do like the imagery though. Despite the fact that a kindergarten teacher may be able to get a group of 5 year olds to work together to accomplish some relatively impressive things, that does not mean that any random adult can do the same.

The guy who mentored me in multi-threading suggested an analogy that I've always found useful. Writing multi-threaded code is to writing single-threaded code as playing a musical instrument is to conducting an orchestra. A single musician can be a little sloppier and ad-lib quite a bit without ruining the result. That doesn't work with an orchestra. (You could argue it does work with a good Jazz band.) This is not to say that individuals are sloppier, but a single person does not have the coordination issues that an orchestra does. (Disclaimer: I am not a musician and don't even play one on the Net.)

The point is not that you should never use threads, but that organization and coordination become more important.

The suggestion that you try multi-threading in a smaller experiment before applying it to a big system does not seem to be FUD to me. I would give the same advice to someone trying out a new programming language, methodology, framework, or any other piece of technology.

I suspect that much of the FUD about threaded code out there is spread by people who jumped in with both feet, rather than doing a test program. At least, that has been my experience with some who are fanatically against any form of threading.

G. Wade

In reply to Re^3: Multithreading, how to? by gwadej
in thread Multithreading, how to? by iSina

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.