get-uv-event-loop-napi-h
Version:
C function to get the current libuv event loop for N-API
40 lines (27 loc) • 1.51 kB
Markdown
get-uv-event-loop-napi-h
=================================
### C function to get the current libuv event loop for N-API
[](https://greenkeeper.io/)
[](https://npmjs.org/package/get-uv-event-loop-napi-h)
[](https://npmjs.org/package/get-uv-event-loop-napi-h)
[](https://travis-ci.org/node-ffi-napi/get-uv-event-loop-napi-h?branch=master)
[](https://coveralls.io/r/node-ffi-napi/get-uv-event-loop-napi-h?branch=master)
[](https://david-dm.org/node-ffi-napi/get-uv-event-loop-napi-h)
Installation
------------
Install with `npm`:
``` bash
$ npm install get-uv-event-loop-napi-h
```
Usage
-----
In your `binding.gyp`:
```python
'include_dirs': ["<!@(node -p \"require('get-uv-event-loop-napi-h').include\")"],
```
(Just have `"<!@(node -p \"require('get-uv-event-loop-napi-h').include\")"` somewhere in that list, ok?)
In your C code:
```c
#include <get-uv-event-loop-napi.h>
uv_loop_t* loop = get_uv_event_loop(env);
```