[pygtk] Threads in PyGTK: keep typing while ping-ing
Mamahita Sela
mamahitasela at yahoo.com
Wed Feb 18 13:18:38 WST 2009
Dear Graham,
> Having the callback return False is what prevents it from
> being called
> again. Using gobject.idle_add() ensures that the callback
> is executed
> from within the gtk.main() thread.
Thank you very much for your very clear explanation.
> Well, I'm not surprised the application won't quit
> normally. It's
> creating 20 new threads every 5 seconds but only letting
> one thread
> execute a ping request at a time. This is probably leading
> to an ever
> increasing backlog of locked threads.
I see :) Thank you very much.
> If you want to restrict it to one ping request at a time
> then you
> should just create one thread and loop over all the
> requests from
> within it, like Frédéric suggested above.
Yes, i also tried to create only one thread, and everything is working properly too.
Thank you very much. Now i can continue to learn more about threading and PyGTK.
Best regards,
M.
More information about the pygtk
mailing list