joyent/node — pull request #5583 by sam-github (2013-05-29 01:27:22+00:00)
Title: Emit keepalive event

This was partially spurred by unit tests silently exiting. The code under test was buggy, it failed to schedule any work, but the result was the test runner bailing with exit 0, and no clear indication in the output what had happened. This event would allow timer-less detection of the exit condition.

Possible names for this event were:

- dead, my favorite, its emitted when the event loop is no longer alive, and is short
- preexit, also good, but might suggest that people use the event for actions that they want "before exit", when the exit event is the right choice
- keepalive, what's in the code now, indicates the purpose, keeping node alive after the event loop empties

I'm open to suggestions if this is considered useful.

I didn't know how to structure a node pull request that will fail to build without a libuv upgrade, so I applied joyent/libuv#813 to deps/uv and used that as a base.