Is recent GTK 3.22 still Boehm GC friendly (thread issue)?

Gtk does not call any signal handler from a non-main thread. Any worker thread you found in a Gtk application interacts with the main thread via a message queue. You can see that in the Glib source. For example, see the implementation of g_dbus_connection_signal_subscribe() and schedule_callbacks() in gdbusconnection.c.(A worker thread calls g_source_attach(…, subscriber->context), where the second argument is what g_main_context_ref_thread_default() returned.)

So you don’t need to override memory allocation routines with g_mem_set_vtable(). If you did that before, that was a very poor design, where you replaced the perfect manual memory management implementation in GLib/Gtk with an automatic but imperfect(and non-stable) memory management scheme, Boehm GC.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)