Re: mutex doubt



2011/12/6 Marcelo Elias Del Valle - SYSMAP SOLUTIONS - Claro MA-SP -
<Marcelo Valle claro com br>:
       Do I need to call g_thread_init() manually before calling g_mutex_new (), in a glib only 
application? Or is it auto called by default when I call g_type_init() and therefore I don't need to do it?

Older versions of glib had optional threading support, so you needed
to call g_thread_init() yourself.

Newer versions (in the last 12 months or so? can't remember, but about
that) have made thread support required and the threading system is
now inited for you as part of glib startup.

It's harmless to call g_thread_init() more than once.

John



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