|
Boost : |
From: Andrey Semashev (andysem_at_[hidden])
Date: 2007-02-05 17:24:33
Hello Steven,
Tuesday, February 6, 2007, 1:07:01 AM, you wrote:
> AMDG
> Andrey Semashev <andysem <at> mail.ru> writes:
>>
>> Well, the dispatcher is quite safe even if it's initialized more than
>> once and even concurrently. Being a namespace-scope object is quite
>> sufficient for it. But state names, which are std::strings, are quite
>> fragile in this way. And unfortunately volatile flags won't help here.
>>
> You can use const char* or aligned_storage
The problem is I don't know how to synchronize its initialization
safely. Mutex construction should be synchronized too, that's the
whole problem.
I'll have think of it some more.
-- Best regards, Andrey mailto:andysem_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk