Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nubjs/libnub

C library that allows working with libuv handles off the main thread
https://github.com/nubjs/libnub

Last synced: 18 days ago
JSON representation

C library that allows working with libuv handles off the main thread

Awesome Lists containing this project

README

        

## Overview

libnub is a small wrapper around [libuv](https://github.com/libuv/libuv) to
make it possible to work with handles off the same thread running the event
loop. The API can be summarized in the following points:

* Create/dispose of threads against a specific event loop.

* Push "work" to a child thread from the event loop thread.

* Introduce the "event loop mutex" which will halt execution of a child thread
until the event loop can be operated upon.

## Documentation

Look at `include/nub.h`.

## Build Instructions

Building only currently works on Linux. Run the following:

```
mkdir out
./build.sh
cd out/
make
```

Can also use `BUILDTYPE=Debug make` to perform the debug build.

## Tests

Currently in a sad state, but can run what currently exists by running
`out/{Debug,Release}/run-nub-tests`.