mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Deprecate g_thread_init()
Move the last few things that needed thread-safe initialisation to a global ctor. https://bugzilla.gnome.org/show_bug.cgi?id=660744
This commit is contained in:
@@ -33,28 +33,15 @@
|
||||
|
||||
#include "glib.h"
|
||||
|
||||
#include "gthreadprivate.h"
|
||||
|
||||
void
|
||||
g_thread_init (gpointer init)
|
||||
{
|
||||
static gboolean already_done;
|
||||
|
||||
if (init != NULL)
|
||||
g_warning ("GThread system no longer supports custom thread implementations.");
|
||||
|
||||
if (already_done)
|
||||
return;
|
||||
|
||||
already_done = TRUE;
|
||||
|
||||
g_thread_init_glib ();
|
||||
}
|
||||
|
||||
void
|
||||
g_thread_init_with_errorcheck_mutexes (gpointer vtable)
|
||||
{
|
||||
g_assert (vtable == NULL);
|
||||
|
||||
g_thread_init (NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user