Excellent point made here.

And it shows a key element of this entire debate. The decision to fork or to thread should be based on need, form and function of the code. In some cases, it's is clear that fork is the better solution, others it is thread. A good programmer / developer will try to have both skills under their belt (though I'm not quite a that level, yet).

Another consideration, though, is the fact that not all systems have Perl threading available. Some systems do not have a version of Perl installed that allows threads, and may not be able to install an outside module that will allow it (like the place where I work). I know that will sound unusual, but consider the fact that some places hold a VERY tight control over what is installed from an outside source. If it is a secure (i.e. DoD, NSA, etc.), the site may not allow additions to the system that way becaused they are not 'blessed' by certain security-minded individuals.

All in all, sometimes the 'better' choice isn't an option. Best to have all the tools you can available in your own head.


In reply to Re: Re: Why use threads over processes, or why use processes over threads? by mcogan1966
in thread Why use threads over processes, or why use processes over threads? by pg

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.