"Branden" <[EMAIL PROTECTED]> wrote:
> The thing with mandatory locks per variable, is that as long as you only
> want to access _that_ variable, it's ok, but if you want to make several
> uses of several variables and want to do it all at once, you've got a
> problem.

[ big snip ]

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.

Reply via email to