Vláďa wrote: > [...] > However the are some things which are unclear to me. First I read that I > have to use gtk.gdk.threads_enter() and gtk.gdk.threads_leave() whenever > I want to modify something in main GUI. But if I remove these commands I > don't see any change. It still works. What exactly do these calls?
With threads there are certain bugs that appear only at times. When you remove enter/leave, you most likely trigger such bugs. I.e. it may work fine for you 100 times, then crash or something else on 101th. And on some other machine it may crash every second time. In other words, _never_ remove enter/leave unless you understand what you are doing. > [...] > Apparently I'm doing something wrong because after making my application > a little bigger, I have random freezes and locks. I'm absolutely new to > threads, I understand what are they good for, but unfortunately I have > almost no idea about the consequences and the problems they bring. That is just one example. Study synchronization, when it is needed and how it is implemented. This is not something that can be explained in one mail. Paul _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/