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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |