Description
When setting a timeout for the Listener.join() method, Listener doesn't stop after the timeout time. From some debugging, looks like the issue is that the join method gets stuck on on exc_type, exc_value, exc_traceback = self._queue.get() (line 273 of pynput/_ util/ init .py) indefinitely.
Platform and pynput version
OS: macOS 11.6.5, Ubuntu 20.04, Windows 10
Python: 3.9
pynput: 1.7.6
To Reproduce
def on_press(key):
print(key)
def on_release(key):
if key == keyboard.Key.space:
print(key)
# Stop listener
return False
with keyboard.Listener(on_press=on_press, on_release=on_release) as listener:
listener.join(1)
Description When setting a timeout for the Listener.join() method, Listener doesn't stop after the timeout time. From some debugging, looks like the issue is that the join method gets stuck on on
exc_type, exc_value, exc_traceback = self._queue.get()
(line 273 of pynput/_ util/ init .py) indefinitely.Platform and pynput version OS: macOS 11.6.5, Ubuntu 20.04, Windows 10 Python: 3.9 pynput: 1.7.6
To Reproduce