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
While experimenting with monitoring multiple RFID readers on a loop I found what turned out some weird blocking behavior, events queueing up and being batched.
Looking through issues and pull requests I found out about device.setNonBlocking which solves this specific issue.
I'll craft a PR to address this, but to fully understand this issue, could anyone enlighten me on why this is not the default behavior?
I will update the README to reference device.setNonBlocking() though. Thanks!
(I hope the recent changes happening to hidapi will fix some of the gremlins impacting a few node-hid users and let us understand better how this nonblocking stuff is messing up)
Activity
peitschie commentedon Jun 19, 2019
Just bumping this as I was having issues with node hanging on exit unless I call
device.setNonBlocking(true).Is this intended to be an internal-only function?
add device.setNonBlocking() to README, #216
todbot commentedon Jun 19, 2019
As mentioned in another issue,
node-hidis a slim wrapper around https://github.com/libusb/hidapiI will update the README to reference
device.setNonBlocking()though. Thanks!(I hope the recent changes happening to
hidapiwill fix some of the gremlins impacting a fewnode-hidusers and let us understand better how this nonblocking stuff is messing up)