it may just be the way STDERR/OUT is handled on my system

Another possibility. And one that is both far easier to understand and also nicely attributable to 'user error' rather than a serious internals bug.

That said, I did consider the possibility that there was some kind of interleavcing of threaded output at play here, but it is very hard to see how that could give rise to this output:

2$VAR1 = { 'a' => {} }; 1$VAR1 = { 'a' => {}, 'b' => {}, 'a' => {}, 'b' => {} };

Not only would the output from thread 2 have to be delivered to the screen out of order--the close brace appearing before the 'b' pair--the 'a' pair from thread 1 would have to be delayed, interleaved and duplicated, and I find it impossible to dream up the scenario where the absence of resource locks could produce that effect.

You could certainly try using the tprint() sub I posted earlier in the thread (or rolling your own), but I wouldn't hold any great expectation of it providing a fix.

Then again, I cannot reproduce the problem here even if I bypass the ouput serialisation my OS does when writing to the screen, by redirecting the putput to a file. 5.8.6 or 5.10.0, I always get the same correct output. If I remove the sleeps from teh threadproc, I can indice some variablility, but nothing untoward or unexplainable.

This certainly seems to be a platform (or perhaps complier/CRT) specific problem.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^18: does threads (still) memleak? by BrowserUk
in thread does threads (still) memleak? by faxm0dem

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.