Reputation: 728
I have a thread in PyGTK, inside my mainloop. It's a Timer, so it needed to be joined with .join(). The problem is, I now cannot edit my UI from in that thread - change text and so on - because of the .join(). Is there a way I can change things from outside (well, you know what I mean) the mainloop?
Thanks.
Upvotes: 0
Views: 104
Reputation: 223102
instead of using a Timer thread, use glib.timeout_add
to do your thing.
It works together with gtk's mainloop and runs in the same thread, so you don't have to do anything special.
Upvotes: 2