in reply to Re: Slow evolution of Perl = Perl is a closed Word (NQP, parrot concurrency == Oh dear.)
in thread Slow evolution of Perl = Perl is a closed Word

From the standpoint of Perl 6 (the language), we've thought about a lot of these things from the standpoint of fundamentals. What you find in the draft concurrency spec is more like a laundry list of things people would like. However, part of the reason we've not bothered much with that document is precisely because concurrency must be built into the design from the ground up, not because we're ignoring the topic. Hence, just off the top of my head, in the basic design of Perl 6 you will find various reassuring tendencies: These bits of design all contribute to easier concurrency, but are spread out over all the existing synopses, and most of them are not explicitly labeled as "concurrency support". That is not to say that there are not still many open issues, and as you say, we'll have ample opportunity to discuss them.

Specifically with regard to STM, while STM doesn't itself address the issue of non-reversible external operations, I think it does potentially address the issue of acquiring the locks in preparation for doing such an operation, since the locks themselves are presumably in memory. And I suspect that STM can be extended to manage anything that can be construed as "memory" as long as it has reversible characteristics.

Anyway, in many cases I think the compiler will have enough hints to determine whether the code is reentrant and whether the data has to be shared without forcing ordinary users into a monadic lifestyle. And where the compiler is not so sure, it can likely ask the programmer politely for a few more clues. In any case, the Perl 6 language is mutable and strongly versioned, so we can hopefully fix it where it goes wrong.

  • Comment on Re^2: Slow evolution of Perl = Perl is a closed Word (NQP, parrot concurrency == Oh dear.)

Replies are listed 'Best First'.
Re^3: Slow evolution of Perl = Perl is a closed Word (NQP, parrot concurrency == Oh dear.)
by BrowserUk (Patriarch) on Sep 11, 2007 at 01:18 UTC

    For my part, I have had no concerns about the plans for concurrency in Perl 6, at the language level, going back a very long time.

    I don't follow how STM can be used to address locking of non-reversible external operations. There seems to be a total disconnect between the requirements and operational modes of the two:

    STM is optimistic: every thread completes its modifications to shared memory without regard for what other threads might be doing, recording every read and write that it makes in a log. Instead of placing the onus on the writer to make sure it does not adversely affect other operations in progress, it is placed on the reader, who after completing an entire transaction verifies that other threads have not concurrently made changes to memory that it accessed in the past. This final operation, in which the changes of a transaction are validated and, if validation is successful, made permanent, is called a commit.

    But even if it cannot, some other mechanism can be used. Provided that other mechanism is availabe to the language from the underlying runtime.

    My concerns have been, and remain, whether Parrot will have the wherewithal to underwrite the demands and operations that Perl 6 will call upon it to make.


    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.