I was never a fork man. The model followed by POSIX threads seemed a lot more natural (unlike the analogies that follow :).

With a thread, your program becomes like a person split in two. Both of you exist in the same universe at the same time. Both of you are free to walk around the room and fiddle with things you find. If your alter ego(s) are fiddling at the same time though, you might break something. You can even take an axe to your alter ego {1}, and the results are well defined.

Fork on the other hand is something like the many-universes theory of QM. There exists another copy of your self somewhere, but to talk to it you need to have an inter-dimensional pipe, and you need some machinery on either end to interpret and act on the messages. You can break less stuff, but you've got this big machine sitting in your living room ...

Anyhow, enough strained metaphor - what I want to know is, "to thread or not to thread", and why? I am frightened by the Camel book's sternly worded warnings, and the apparently hideous platform incompatibilities that might be introduced by adopting threads. Fork on the other hand seems to fit the perl world a lot more nicely.

Thoughts? Are you using the threading model, and has it died yet?

{1} Petruchio - yes I was thinking of the old money lender.

--
Ash OS durbatulk, ash OS gimbatul,
Ash OS thrakatulk, agh burzum-ishi krimpatul!
Uzg-Microsoft-ishi amal fauthut burguuli.


In reply to To thread or not to thread by hagus

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.