Sharing unlocked, unchanging data between threads?

Chris Williams aahz at seanet.com
Tue Aug 10 11:53:18 PDT 2010


== Quote from Jonathan M Davis (jmdavisprog at gmail.com)'s article
> Well, unless it's declared shared, it's going to be thread-local,
and then each
> thread is going to have their own copy. Now, if it were declared
shared and you
> never changed it after initially setting all of its values, then you
shouldn't
> have any problems as far as I'm aware. Just accessing an associative
array
> shouldn't change it.
> - Jonathan M Davis

I'm using D 1.0. I don't believe it has a "shared" keyword. But,
globals are shared as well, I presume.


More information about the Digitalmars-d-learn mailing list