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:
parent
bf24f8460b
commit
da87eb71e6
@ -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):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user