On Wed, Jun 24, 2015 at 08:44:39AM -0000, Ed Schouten wrote: > The following patch adds a knob to libc++, > _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable > thread-unsafe functions that can easily be avoided in practice. The > following functions are not thread-safe: > > - <clocale>: locale handles should be preferred over setlocale().
Note that setlocale() *is* thread-safe on a correctly implemented UNIX. It is a bug if you don't get consistent results with a clear before-after semantic even when other threads call locale-sensitive funcctions concurrently. Joerg _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
