[dmd-concurrency] tail-shared by default?

Walter Bright walter at digitalmars.com
Fri Jan 8 23:36:34 PST 2010



Steve Schveighoffer wrote:
> I think the idea is sound because you *must* pass a pointer to shared data into a function, you can't actually pass the real data, so the pointer itself that lives on the stack should *never* be shared, it's always thread local.  Sharing stack data would be more of a pending disaster in my opinion, since stack data is deallocated at will by returning from a function!
>
>   

Think about passing a local by reference to another function, i.e. ref 
parameters.

If I understood you correctly, you are not talking about adjusting the 
type, but about having something not be shared because it's a local. 
Having special case rules often sound good, but later turn out to have 
unforeseen consequences (C++ is full of them). They are best avoided as 
much as possible.


More information about the dmd-concurrency mailing list