Closed idjaw closed 8 years ago
Am I right saying that this pull request include changes of #18 and closes issues #14 and #16?
I say :+1:
If the while t.isAlive(): t.join(1)
can be replaced for t.join()
I would prefer this.
JoProvost: if you did that, the KeyboardException will never be found because the main thread will be "stuck" doing "join". With that, we have a <=1s response time to SIGINT. Additionally, we have a test covering this case.
By the way, just joining worked on py3, but py2 required us to do that workaround.
And yes, Wajdi included the code from the other PR in here (so that PR doesnt have the right title anymore, because it's bringing other code in)
/me hates github, if this was gerrit I could have updated wajdi's commit, or he could have updated mine.
@idjaw: If you could change the commit message to something like that:
Handle SIGINT correctly on Python 2.7
Currently, VirtualPDU is unstoppable on Python 2.7. Correct this by
handling KeyboardInterrupt events in the main thread.
Closes issues #14 and #16
I strongly put :+1:
lgtm besides the retry/retrying requirement.
This fix helps resolve currently breaking builds due to an issue with timeouts happening when starting the SNMP PDU Harness. Furthermore, work has been done here to help deal with hanging threads in py27