Is there a way to schedule the execution of a callable until the glib main loop is entered?
Alternatively, is there a signal I can subscribe to that will indicate that the main loop is entered?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use gobject.idle_add which will schedule a callable to be executed when the main loop is idle. gobject.timeout_add is an alternative which uses a timer.
Mind that the callable will be called again and again, unless is returns
False(or anything that resolves toFalse, likeNone).