If you're looking for the problems of tacking on threads afterwards, you can also take a look at the Python Global Interpreter Lock (and the discussion around it). While I'm not a fan of Guido van Rossum's striving for speed for speeds sake, the discussion highlights the problems that you encounter when you don't plan for share-everything threading/lightweight threading/fibers/coroutines from the start.

Of course, there remain the semantical problems of the global name space of Perl, especially what happens in a share-everything model with the following code:

sub quote_string { qq{"\Q$_[0]\E"} }; sub send_to_client { my $client_socket = shift; async { print {$client_socket} quote_string($_) for @_; }; }; function send_strings_to_client { local *quote_string = sub { qq{'\Q$_[0]\E'} }; send_to_client(@_); };

With a share-everything, it's not really clear how overwriting the globs should be handled. I would be for "overwriting (code) glob entries is discouraged" and there should/could be a strict 'thread-globs' pragma that prevents you from assigning to glob entries. This should prevent 95% of all those problems.


In reply to Re^3: Slow evolution of Perl = Perl is a closed Word (NQP, parrot concurrency == Oh dear.) by Corion
in thread Slow evolution of Perl = Perl is a closed Word by Anonymous Monk

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.