mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 18:07:37 +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()
|
self.thread.start()
|
||||||
|
|
||||||
def unregister(self):
|
def unregister(self):
|
||||||
if self.thread:
|
thread = self.thread
|
||||||
PostThreadMessage(self.thread.ident, WM_QUIT, 0, 0)
|
if thread:
|
||||||
self.thread.join() # Wait for it to unregister hotkey and quit
|
self.thread = None
|
||||||
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):
|
def worker(self, keycode, modifiers):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user