Skip to content

Possible chances to take advantage of libuv stability #361

@ghinks

Description

@ghinks

Possible chances to take advantage of libuv stability

Use of libuv polling for the more hardware orientated modules is being seen.

Use is being made of libuv to detect events on a file descriptor in existing stable modules. Some of the features that libuv provide could be exposed via NAPI or use of libuv could be allowed in order to avoid complex changes to some modules.

modules looked at that support these cases

github repo description npm wkly downloads thousands
node-serialport arduino serial port driver allowing educational and hoby 23
node-raw-socket module used by net-ping for JS ping utilities 433

Code fragement example

void Poller::poll(int events) {
  this->events = this->events | events;
  int status = uv_poll_start(poll_handle, events, Poller::onData);
  if (0 != status) {
    ...
    return;
  }
}

Code line links

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