不要怂,就是干,撸起袖子干!

Commit 2203db2f by Sascha Depold

Merge branch 'setimmediate' of https://github.com/durango/sequelize into durango-setimmediate

2 parents 78645c10 202c33fb
Showing with 3 additions and 3 deletions
......@@ -2,11 +2,11 @@ var util = require("util")
, EventEmitter = require("events").EventEmitter
, Promise = require("promise")
, proxyEventKeys = ['success', 'error', 'sql']
, tick = (typeof setImmediate !== "undefined" ? setImmediate : process.nextTick)
var bindToProcess = function(fct) {
if (fct) {
if(process.domain) {
if (process.domain) {
return process.domain.bind(fct);
}
}
......@@ -21,7 +21,7 @@ module.exports = (function() {
util.inherits(CustomEventEmitter, EventEmitter)
CustomEventEmitter.prototype.run = function() {
process.nextTick(function() {
tick(function() {
if (this.fct) {
this.fct.call(this, this)
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!