Nice to @Share?
dl at cs.oswego.edu
Tue Feb 23 12:20:33 PST 2010
On 02/23/10 15:06, Neal Gafter wrote:
> On Tue, Feb 23, 2010 at 11:51 AM, Doug Lea<dl at cs.oswego.edu> wrote:
>> One cannot define a processor- or language-level memory
>> model without reference to a category of variables that are
>> intrinsically local to a processor/thread.
> Why not?
Axiomatic locality is needed for the sake of modular
specification and reasoning. Otherwise memory properties
could only be validated in the presence of global program
analyses proving that a variable is only accessed in one
thread. And given dynamic loading, one cannot in general
perform global analysis.
>> Of course, the absolute knowledge that a local is in fact
>> thread-private is critical in implementing many concurrent
>> algorithms. It is frightening to contemplate how to
>> program without this.
> None of those concurrent algorithms would be undermined in any way by
> allowing lambdas, or anonymous inner classes, to share local variables
> from enclosing scopes.
But rarely verifiably or provably so.
More information about the lambda-dev