[dmd-concurrency] Defining shared delegates
Andrei Alexandrescu
andrei at erdani.com
Tue Jan 19 12:18:21 PST 2010
Michel Fortin wrote:
> - If the data carried by the delegate is thread-local, in whole or in part,
> then the delegate is thread-local.
I haven't thought much about shared delegates, but on the face of it
this doesn't work. A delegate may increment an ostensibly thread-local
variable and return it. Then, the delegate may be passed to several
threads. Race ensues.
Andrei
More information about the dmd-concurrency
mailing list