I am trying to learn how mutex works in multithread application, but I have some doubts. In my case I have thread which read from device, thread which write to device and synchronization thread. In sync thread I have a timer in this form:
def CheckConnection(self):
. . .
threading.Timer(1, self.CheckConnection).start()
This timer runs periodically CheckConnection function.
Could you tell me:
When thread is locked (acquired) it means that thread stops execution and waits? this is sth like pause?
What will happen when I start synchronization thread, my checkConnection function executes and timer starts, after it synchronization-thread is locked... This will stop the timer and execution of CheckConnection function?