incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nikko...@hates.ms>
Subject Re: Fwd: Re: STDCXX-1071 numpunct facet defect
Date Sat, 27 Oct 2012 13:20:47 GMT
On 10/26/12 18:50, Martin Sebor wrote:
> On 10/26/2012 06:50 AM, Liviu Nicoara wrote:
>> [...]
>> tl;dr: removing the facet data cache is a priority. All else can be put
>> on the back-burner.
>> [...]
>> // facet data accessor
>> ...
>> if (0 == _C_impsize) {           // 1
>>     mutex_lock ();
>>     if (_C_impsize)
>>         return _C_data;
>>     _C_data = get_facet_data (); // 2
>>     ??                           // 3
>>     _C_impsize = 1;              // 4
>>     mutex_unlock ();
>> }
>> ??                               // 5
>> return _C_data;                  // 6
>> [...]
>> Various compilers provide these features in various forms, but at the
>> moment we don't have a unified STDCXX API to implement this.
>>
>
> [...]
> I suggested moving the body of the outer if from the header
> into a .cpp file in the library where we could implement
> ugly, bloated locking without the risk of breaking things
> if we removed/replaced it in the future. That's when we ran
> into questions about how exactly to do this cleanly, etc.
> It didn't seem to be doable very cleanly but I still think
> it's a viable approach.

Just making sure we are talking about the same thing. My argument (and the code oversimplification
above) was about the initialization of the std::facet data, not the cached numpunct data.
I think we should get rid of the numpunct cache right away because it makes the facet unusable
in MT builds.

As for the DCII I was talking about in the previous post, I would tackle it but I only have
access to x86(_64). Does the foundation have shared dev machines?

Liviu

Mime
View raw message