I am trying to use threading.Timer, I am wondering is this timer is started in another thread? So I need to protect the variables accessed by this timer?
Share
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 could see in the threading.py file that
threading.Timer()returns an instance of a newThread. Or you could run an example:You need to protect the variables accessed by
Timer‘s callback.