Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tiny node module to expose uv_run and uv_run_once to JavaScript
C++ Python
Branch: master

Merge pull request #1 from boba1l0s2k9/master

Fix package.json to work with Windows in addition to Linux, bump version...
latest commit cc8ec1dbce
@creationix authored


Bindings to the uvrun functions in libuv to node.js.

Normally these functions are implicitly called by node itself.

By using runOnce, you can have finer grained control of the event loop and know when it's idle.

var runOnce = require('uvrun').runOnce;

// Do something here, like make a server to keep the event loop busy
var TCP = process.binding('tcp_wrap').TCP;
var server = new TCP();
server.onconnection = function () {
server.bind("", 3000);

// Visualize each event loop tick using a custom event loop.
console.log("Waiting for events...");
do {
  var ret = runOnce();
} while(ret);
// If the code gets here, there are no events left and node's built-in uv_run won't block.
Something went wrong with that request. Please try again.