Threads and Static Data

"Jérôme M. Berger" jeberger at free.fr
Mon Dec 10 10:52:07 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Regan Heath wrote:
> Sean Kelly wrote:
>> Craig Black wrote:
>>>
>>> Suite!  I think I've seen the term "thread local", but it never
>>> occured to me what it meant.  Goes to show you how green I am when it
>>> comes to threading.  I'll check it out.  Thanks.
>>
>> For what it's worth, some C/C++ compilers have "thread local" as a
>> storage class.  I've proposed adding this to D before, but there
>> seemed to be no interest at the time.
> 
> If I want thread local storage I just add the variables as static
> members of the class I've derived from Thread.
> 
> Does thread local storage give us some advantage over that?
>
	But if you want to launch several instances of this thread at the
same time, your variables won't be local, will they?

		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeberger at free.fr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeberger at jabber.fr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHXYrXd0kWM4JG3k8RArl2AJ47m7+I351Uzsq5d5IPztpmOeNNXACdEaSf
WLPKfctUHx5gvl3b6nFMxSk=
=06vK
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list