Best as I can figure it though I haven't seen it written anywhere, so if anyone knows better, I to would like to hear the real skinny?

  1. why name of threads hasn't capital letters, on the contrary to most of modules.

    The threads::shared module acts in a vaguely pragma-like fashion in as much as, if threads has not been loaded prior to threads::shared, then the facilities provided by the latter do not cause errors, but act as no-ops. Ie. They silently do nothing.

    The intention being (I think), that authors could write modules, that need to use my $var :shared;, share() and lock() etc. if they are running in a threaded program, but not, if they were not.

    By making threads::shared silently do nothing unless threads was loaded, it (theoretically), allowed the authors to avoid having to hard code explicit tests for threads into their modules.

    The naming of threads all lower case was necessary so that the name of threads::shared could also be all lower case.

    Whether the aim of creating transparently 'dual mode' modules is actually achievable I'm doubtful.

  2. if thread module is outdated, why not combine thread::whatever to threads?

    By "thread module", I assume you mean Thread. Basically because of history I think--nothing is ever deleted from CPAN so renaming things is a problem.

    I wish that there was some sensible action that could be taken to avoid the confusion between those Thread::* modules that work with threads and those that were written for use with Thread and either haven't or cannot be modified for use with the former.


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: name of threads by BrowserUk
in thread name of threads by xiaoyafeng

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.