From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-12-01 17:10:58
>>> I tried to convert
>>> "boost::detail::allocator_impl::mutex" from static
>>> variable to Meyer's singleton (with static member
>>> function which contains local static variable "mutex").
>>> This solves my problem but I can't suggest any patch
>>> because I can't test it with many compilers.
>> This is frequently met issue with global variables. Peter will you be
>> able to handle this?
> I'm not sure how. Turning a mutex into a singleton defeats the whole point
> of using a mutex, because it introduces an initialization race. But I'll
> to think of something that improves the current situation.
I am not sure there is a way around this. It should be created on request.
Otherwise no global/static variables could use smart_ptr, isn't it?