Walter is right about transitive readonly - here's the alternative

BCS ao at pathlink.com
Thu Sep 13 08:24:56 PDT 2007


Reply to Janice,

> On 9/13/07, Christopher Wright <dhasenan at gmail.com> wrote:
> 
>> Janice Caron wrote something brilliant:
>> 
> <grins>
> 
>> - A function that doesn't change anything that anyone can see need
>> not be threadsafe
>> 
> This is really the biggie...
> 
> If thread safety is a language goal then /everything/ must be
> threadsafe, period. No exceptions. None.

No exceptions? what about stack frames? Yes I known that's a little ridicules 
but the only things that /need/ to be thread safe are things that more than 
one thread can view.

Based on that, how about work at the other end with some sort of keyword 
that says "Must not be moved to another thread"? I don't (yet*) know how 
this would be enforced but it's kind of interesting


* I may be, in the near future, working on a project that involves High assurance 
information flow assertions. The work there might help define what "no movement" 
would requiter. OTOH having such a concept might make D vary useful in some 
types of programming (multi level secure systems, NSA stuff, etc.)





More information about the Digitalmars-d mailing list