Threading Questions

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Oct 1 00:37:32 PDT 2015


On Friday, 25 September 2015 at 15:19:27 UTC, bitwise wrote:
> I know that all global variables are TLS unless explicitly 
> marked as 'shared', but someone once told me something about 
> 'shared' affecting member variables in that accessing them from 
> a separate thread would return T.init instead of the actual 
> value... or something like that. This seems to be 
> wrong(thankfully).

T.init is returned for TLS variable when accessed from a thread 
for which it wasn't initialized.


More information about the Digitalmars-d-learn mailing list