abi-stable-node
abi-stable-node copied to clipboard
Possible chances to take advantage of libuv stability
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
I would love to see this. uv_poll_t is very useful and not very complex.
@cjihrig in the event of a libuv-2.0 release, is there danger of the polling API suffering an ABI break?
Not that I'm aware of, but I'm going to ping @bnoordhuis just in case.