Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible chances to take advantage of libuv stability #361

Open
ghinks opened this issue Feb 7, 2019 · 3 comments
Open

Possible chances to take advantage of libuv stability #361

ghinks opened this issue Feb 7, 2019 · 3 comments

Comments

@ghinks
Copy link

ghinks commented Feb 7, 2019

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

@reconbot
Copy link

reconbot commented Apr 30, 2019

I would love to see this. uv_poll_t is very useful and not very complex.

@gabrielschulhof
Copy link
Collaborator

@cjihrig in the event of a libuv-2.0 release, is there danger of the polling API suffering an ABI break?

@cjihrig
Copy link

cjihrig commented May 6, 2019

Not that I'm aware of, but I'm going to ping @bnoordhuis just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants