Skip to content

Commit

Permalink
improve stop hotkey performance
Browse files Browse the repository at this point in the history
  • Loading branch information
spyoungtech committed Jul 8, 2023
1 parent dc3b4bd commit be53d46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ahk/_hotkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ def start(self) -> None:
def stop(self) -> None:
assert self._running is True, 'Not running! Must be started first!'
assert self._dispatcher_thread is not None
for i in range(1, 6):
for i in range(1, 11):
if self._proc is not None:
break
logging.debug(f'stop called before dispatched has started proc. Waiting for proc ({i}/5)')
time.sleep(0.2)
logging.debug(f'stop called before dispatched has started proc. Waiting for proc ({i}/10)')
time.sleep(0.1)
assert self._proc is not None
self._running = False

Expand Down

0 comments on commit be53d46

Please sign in to comment.