1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Fix race condition on stopping.

This commit is contained in:
Jonathan Harris 2016-01-31 12:44:39 +00:00
parent bf24f8460b
commit da87eb71e6

View File

@ -296,10 +296,11 @@ elif platform == 'win32':
self.thread.start()
def unregister(self):
if self.thread:
PostThreadMessage(self.thread.ident, WM_QUIT, 0, 0)
self.thread.join() # Wait for it to unregister hotkey and quit
self.thread = None
thread = self.thread
if thread:
self.thread = None
PostThreadMessage(thread.ident, WM_QUIT, 0, 0)
thread.join() # Wait for it to unregister hotkey and quit
def worker(self, keycode, modifiers):