I do have to wonder at the need for two separate interfaces though?
thread->create( { context => 'list' }, ...
# -v-
thread->create( { list => 1 }, ...
The short answer is flexibility. The former is more descriptive; the latter more succinct. Use the style which suits you best.
What context results from this?
threads->create( { scalar => 1, void => 1, context => list, list => 0 }, ...
The official answer would be The behavior is unspecified. The technical answer is that the code checks for context first, and would then ignore anything else.
My main objection is the effect on performance.
...
The additional complexity of parsing and validating the dual interface comes at a critical point in those applications that are most likely to make most use of them.
At most, the penalty is a few exists calls (1 for context which is first in the code, up to 4 in the case of void which comes last), plus a hash fetch. Further, this feature is implemented entirely in XS code, and so is quite fast.

Additionally, if this feature is not used, there is no performance penalty. Therefore, if your code is really that super sensitive to response, don't use it.


Remember: There's always one more bug.

In reply to Re^2: Explicit thread context by jdhedden
in thread Explicit thread context by jdhedden

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.