Re: thread support in Windows: problem
- From: "Brian J. Tarricone" <bjt23 cornell edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: thread support in Windows: problem
- Date: Thu, 24 Jan 2008 12:54:21 -0800
fkater googlemail com wrote:
Write wrapper functions for any gtk operation you'd like to execute from
threads in a way that the thread calls a glib's idle function which does
the real gtk work. Additionally (!) you need to lock gtk/gdk access by
the gds_threads_enter/leave functions -- since idle functions are not
auto-locked by gtk (like signals are).
Well, if you set it up so all gtk/gdk functions end up being called by
the main thread by using g_idle_add(), then there's no reason to call
gdk_threads_init() and thus no need to use gdk_threads_enter/leave(). A
bit simpler that way.
-brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]