Hello guys,
Wout, in a recent commit, asked why we're using gobject.timeout_add
instead of the timer module.
The reason is simple : At the time that we connected the gui to the
backend, to be able to add a watch directly in the add_watch window, I
figured out that threads of the timer module comes in conflict with
the threads of gtk. When gtk was running, no watches could update.
I looked over the net and found this solution. gobject is part of gtk.
When we use timeout_add, it adds the thread in the gtk threads, which
makes everything run smoothly. We can even use Ctrl-C in the console
now! We should use this method for any kind of timer from now on.
Cheers,
PP
|