Don't use a fiber since we don't yield

This commit is contained in:
Sashko Stubailo
2015-01-15 12:27:04 -08:00
parent 2fb5de937a
commit 25e37833ca

View File

@@ -18,15 +18,13 @@ _.extend(exports, {
});
var runHandlers = function () {
Fiber(function () {
fiberHelpers.noYieldsAllowed(function () {
var handlers = cleanup._exitHandlers;
cleanup._exitHandlers = [];
_.each(handlers, function (f) {
f();
});
fiberHelpers.noYieldsAllowed(function () {
var handlers = cleanup._exitHandlers;
cleanup._exitHandlers = [];
_.each(handlers, function (f) {
f();
});
}).run();
});
};
process.on('exit', runHandlers);