develooper Front page | perl.perl6.language | Postings from January 2001

Re: JWZ on s/Java/Perl/

January 30, 2001 08:21
Re: JWZ on s/Java/Perl/
Message ID:
David Mitchell wrote:
> Sorry, I misunderstood you. I think in fact we agree! What I was
> advocating was that Perl should automatically make accesses to
> individual shared variables safe, so 2 threads executing
> 1: $shared = 10;  2: $shared = 20;
> wont guarantee whether $shared ends up as 10 or 20, but will guarantee
> that the internal representation of $shared wont get corrupted.
> Anything that guarantees consistency between multiple variable accesses
> should be up to the programmer to decide where to lock, IMHO.

Sorry, because I think _I_ misunderstood you the first time.

I'm glad we agree. This remark of yours is exactly the point where
I wanted to get with my post. Perl only takes care of concurrent
access to the internal structures of *non-local* variables. This
will probably be piece-of-cake by having specialized vtables that
are present only in *non-local* variables, and take care of holding
some locks for every operation that is made against that variable.
This way shared data structures get protected.

- Branden Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About