summaryrefslogtreecommitdiffstats
path: root/gobject/gobjectmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'gobject/gobjectmodule.c')
-rw-r--r--gobject/gobjectmodule.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 29ccdf2..95d1b76 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -1812,6 +1812,12 @@ pygobject_enable_threads(void)
return 0;
}
+static void
+pyg_note_threads_enabled(void)
+{
+ pygobject_api_functions.threads_enabled = TRUE;
+}
+
static PyObject *
pyg_signal_accumulator_true_handled(PyObject *unused, PyObject *args)
{
@@ -2594,5 +2600,8 @@ PYGLIB_MODULE_START(_gobject, "gobject._gobject")
/* signal registration recognizes this special accumulator 'constant' */
_pyg_signal_accumulator_true_handled_func = \
PyDict_GetItemString(d, "signal_accumulator_true_handled");
+
+ pygobject_api_functions.threads_enabled = pyglib_threads_enabled();
+ pyglib_notify_on_enabling_threads(pyg_note_threads_enabled);
}
PYGLIB_MODULE_END