Re: Gtk2+ and thread safety



Owen Taylor <otaylor redhat com> writes:

Nicholas Allen - Sun Ireland - Software Engineer <nicholas allen ireland sun com> writes:

Hi Owen,

Thanks for the feedback but we are calling gdk_threads_init just after
g_threads_init so I don't think this is the problem.

Guess, I didn't read your mail closely enough. Sorry.

I think I see a possible problem; looks like gdk/gdkwindow.c/gdk_window_update_idle()
is missing GDK_THREADS_ENTER/GDK_THREADS_LEAVE() guards.

If fixing that doesn't help, the best approach is to make as small of
a test case as you possibly can.

Since the problem with update processing is there, there may well be others;
clearly nobody has tested threading with GTK+-2.0 yet. (The general
outline of threading hasn't changed significantly, so any problems
should be trivial.)

I went through all the idles and timeouts in GTK+, and this was in fact
the only place where there was a problem; I've fixed it in CVS; the
fix will be in GTK+-2.0.4.

Thanks,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]