Skip to content

device.setNonBlocking is not documented. #216

Closed

Description

@SchizoDuckie

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?

Activity

  1. peitschie commented on Jun 19, 2019

    @peitschie

    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?

  2. todbot commented on Jun 19, 2019

    @todbot
    Contributor

    As mentioned in another issue, node-hid is a slim wrapper around https://github.com/libusb/hidapi

    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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions