joyent/node — Issue #2718: Expose event loop reference / dereference counting.
Author: bmeck
Created: 2012-02-08 18:45:19+00:00
State: open

For many situations we want to keep long lived connections from holding a program open (logging, ipc, db sync, etc.) see: https://groups.google.com/d/topic/nodejs/Khbenv_QUMk/discussion

There should be some way to add/subtract from the event loop reference count. This could be on handles or via a global, intuitively I think a global makes more sense, since we are affecting the global reference count. Something like:

```
process.ref() process.unref()
```

or

```
var util = require('util')
util.ref() util.unref()
```