Something that has always struck me as odd is that ithreads, the one true threads implementation for perl, is pretty closed minded.

Personally I liked the old Thread way of doing it better. I prefer having everything shared by default, because i find the process of explicitly sharing tedious and more error prone than making sure I don't get into race conditions. Some would argue that it's better, because unshared data will be barked about, but deadlocks aren't really detectible. So what?

What about a third way of doing it? No variables are shared by default, but data is: you can put a reference in a shared variable, and dereference any length of nested structures from it, in another thread.

And so on, and so forth.

So why isn't there another way? Is there going to be another way? Are ithreads going to become lax enough in the future to allow there to be another way without there really being another way?

Here are some other ways I know, but they aren't really satisfactory:

So, given only these alternatives, and only one (real) way to do it, what is a boy to do?

-nuffin
zz zZ Z Z #!perl

In reply to TIMTOWTDI vs. ithreads by nothingmuch

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.