Open phuein opened 5 years ago
👍
Is this going to be merged?
So... we gonna merge this?
This is not the right way to fix this, IMO. The sleep does not belong in the _do_iter
method. Just put in the loop in your own code where you iterate over the InputDevice
instance.
This is not the right way to fix this, IMO. The sleep does not belong in the
_do_iter
method. Just put in the loop in your own code where you iterate over theInputDevice
instance.
This is what I thought. At least we should use asyncio or something so the user has control.
The original platform this was aimed at was Raspberry Pi then I tested it on Linux, Mac and Windows on thirty input devices.
(BTW If the delay is really needed on Windows then any solutions should only be on Windows, which to be fair I think this is. I don't feel I know enough yet to make changes.)
Overloads the CPU otherwise. The While loop should at least take 1ms.