Re: bugs regarding late g_thread_init() calls

Morten Welinder wrote:

This is another thing. Is this correct? If yes, then are we all completely

Certainly.  Google "threads setlocale unix" and see.

For example

To change locale in  a  multi-thread  application  setlocale
should  be  called  prior to using any locale sensitive rou-
tine.  Using setlocale to query the current locale  is  safe
and can be used anywhere in a multi-thread application.

setlocale will happily dlclose code that another thread is running.
Or worse.

Um, non-thread-safe setlocale() is not a problem yet, since g_thread_init()
doesn't create threads. Can g_thread_init() alone break when called before
setlocale() ? E.g. I create threads inside gtk_main(), after gtk_init() which
calls setlocale(); and I create threads after I call bindtextdomain() and
whatnot. Am I good?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]