mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
make g_thread_init_glib() idempotent
This commit is contained in:
parent
cfa1d0540e
commit
6c0dda8265
@ -925,6 +925,13 @@ G_LOCK_DEFINE_STATIC (g_thread);
|
||||
void
|
||||
g_thread_init_glib (void)
|
||||
{
|
||||
static gboolean already_done;
|
||||
|
||||
if (already_done)
|
||||
return;
|
||||
|
||||
already_done = TRUE;
|
||||
|
||||
_g_thread_impl_init ();
|
||||
|
||||
/* We let the main thread (the one that calls g_thread_init) inherit
|
||||
|
Loading…
Reference in New Issue
Block a user