[cpp-threads] C++ committee meeting in Mont Tremblant
Doug Lea
dl at cs.oswego.edu
Sun Oct 23 20:58:20 BST 2005
Peter Dimov wrote:
> Doug Lea wrote:
>
>> Ben Hutchings wrote:
>
>
>>> I agree that static initialisation can currently be much more
>>> difficult than it really should be. However, this problem is not
>>> really on-topic for this list, so can we leave the matter now?
>>
>>
>> Well, there IS the back-door issue about memory-model rules that
>> may apply to guarantee ordering and visibility of static initializers.
>
>
> Can you give an example of the issue?
>
Not knowing anything about what is being proposed, I don't know
if it applies, but if static initialization need not precede
construction of multiple threads, you may need something to ensure that
the statically-initialized value of globalStruct.aField is visible to
any thread that can read globalStruct.
-Doug
More information about the cpp-threads
mailing list