[Gtk-sharp-list] thread safety issues with Gtk TreeView
Sun, 14 Sep 2003 15:35:00 +0000
i have a widget which contains a Gtk TreeView. New rows are added to the
TreeView from a different thread than the GUI thread. At random times in my
application the GUI will freeze up and this exception occurs:
System.NullReferenceException: A null value was found where an object instance
in (unmanaged) 06 Gtk.Application:gtk_main ()
in <0x00004> 06 Gtk.Application:gtk_main ()
in <0x00007> 00 Gtk.Application:Run ()
i think the problem is more noticable when i enable sorting of the treeview...
so that probably means that both the GUI thread and the other thread are
accessing the underlying ListStore object at the same time. Now what is the
correct way in gtk# to do this in a thread-safe manner?
in my SWF gui i just use the Invoke method of a Form so the GUI thread will
actually update the ListView, but in gtk# i don't know how to do this. Could
anyone tell me what the best way would be to do this in gtk#?