[Gtk-sharp-list] Gtk# threading problem?

Miguel de Icaza miguel@ximian.com
09 Oct 2002 19:25:25 -0400


> What I found out is that getting all the gnome stuff from my program
> out, it does what it is meant. I mean, commenting all the gnome stuff
> from my program. 

You are using Gtk from two threads (one is the main loop, and you are
pushing data onto a widget in the other).  Gtk is not thread safe, you
can not do this.

You need to have your thread load the data, and when it is ready to
process it, wake up the main thread and have the main thread (which has
the Gtk main loop) feed the data to the widget.

Look at the ThreadNotify class in Gtk# which simplifies the complexicty
of doing this.

Miguel