This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] codecvt<wchar_t, char, mbstate_t> support for UTF-8


>> Am I mistaken in thinking that this introduces even more 
>> thread-unsafe 
>> code sequences into the library?
>
>I was under the impression that __use_locale only changes the locale for
>the current thread, so this should be thread-safe on glibc 2.3 systems.
>Is this correct?

You are correct. 

>You are of course right that MB_CUR_MAX is not thread-safe in general
>(since it depends on the global locale set by setlocale). This however
>seems to be a general problem with the generic locale implementation
>(including codecvt<wchar_t, char, mbstate_t>::do_in and do_out).

This is also correct.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]