Hi,

What is the behavior when we call thread.interrupt_main() method.

Using this method I have implemented a new method for checking timeout.

359    def TimeoutFunc(self):360       '''Function invoked by timer
thread in case of timeout '''361       self.log.debug("Timeout thread
invoked now for test %s" % self.name)362       self.isTimeout =
True363       #Interrupt test process364       thread.interrupt_main()

Above method is invoked correctly, but I am not able to understand the
behaviour. Please have a look into below diagram to explain which I am
using.

[image: Inline image 1]


Since two threads are running same method, I wanted to know which main
thread will be interrupted in both case.

Regards,
~Piyush
Facebook <https://www.facebook.com/piyushkv1> Twitter
<https://twitter.com/SocializePiyush>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to