[dmd-concurrency] is shared going to be a type modifier?
Sean Kelly
sean at invisibleduck.org
Thu Jan 7 14:54:56 PST 2010
On Jan 7, 2010, at 1:18 PM, Michel Fortin wrote:
> Le 2010-01-07 à 15:34, Steve Schveighoffer a écrit :
>
>> In fact, any shared class reference on the stack erroneously will create memory barriers around the stack variable itself -- you shouldn't be sharing any stack data.
>
> I'm not sure you should never be sharing stack data. Stack data can already be allocated on the heap with closures. If you're going to give that closure to another thread, the data it uses needs to be shared.
I knew there was an instance where I might want to declare a delegate as shared. Maybe this could be handled just like scope?
More information about the dmd-concurrency
mailing list