Re: random crash [treeview bug?]



Hi,

Ottavio Campana <ottavio campana vi it> writes:

> at the  beginning I  call g_thread_init  and then  I close  the critical
> code in  gdk_threads_enter and  gdk_threads_leave. I see  my application
> (created with glade2) is running multitasking.

that only assures that any global variables GTK+ and GDK use are used
in a thread-safe manner. You will have to make your own data
structures thread-safe yourself.
 
> What should I do more? How do I do my locking? Have I to use G_LOCK?

the first think you should do is to ask yourself if you really need to
use threads. If the answer is yes, then ask yourself if it is
necessary that more than one thread handles the user interface. If the
answer is still yes (it rarely is), have a look at

 http://developer.gnome.org/doc/API/2.0/glib/glib-Threads.html

and make yourself familiar with mutexes.


Salut, Sven



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