You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am running inputs in a python threading.Thread custom class. Therun methond looks like this:
while True:
events = inputs.get_gamepad()
#process events
Usually i shutdown a thread by using a running flag in the while loop, or, when using a threading.queue i send a None task which then breaks the loop on shutdown.
None of these methods is applicable here, since the run method only fires when events are rad from get_gamepad(). Any idea how to kill this thrad from another thread?
The text was updated successfully, but these errors were encountered:
I too am having the same issue. I am starting two threads to monitor keyboard and mouse events. I am unable to .join() the threads after setting a shutdown flag as they are blocking on the read(). I have yet to find a flag or interrupt that can shutdown inputs cleanly.
def keyboard_handler(self): while self.run_keyboard_handler: events = self.keyboard.read() for event in events: self.process_event(event)
Hi, i am running inputs in a python threading.Thread custom class. Therun methond looks like this:
Usually i shutdown a thread by using a running flag in the while loop, or, when using a threading.queue i send a None task which then breaks the loop on shutdown.
None of these methods is applicable here, since the run method only fires when events are rad from get_gamepad(). Any idea how to kill this thrad from another thread?
The text was updated successfully, but these errors were encountered: