We have a slight problem with Glade-generated C code and threads.
When a toplevel component is destroyed it currently causes a deadlock.
(When the toplevel's datalist is being destroyed, it unrefs the child
widgets, which tries to destroy their datalists, but can't since
the global datalist lock is already held by the toplevel widget.)

Paul Flinders <[EMAIL PROTECTED]> has kindly sent a patch which
uses a separate GHashTable for each toplevel and keeps pointers to
the child widgets there instead of in the toplevel's datalist.
It connects to the "destroy" signal of the toplevel and iterates
over the GHashTable, unreffing the child widgets, thus avoiding
the deadlock.

One other option is to not bother reffing/unreffing child widgets
at all (which is what we used to do). But then there is a small chance
that an application may destroy a child widget, and then sometime
later try to access it with lookup_widget() and get an invalid pointer
and probably crash.

Damon



+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to