Skip to content
This repository was archived by the owner on Dec 30, 2019. It is now read-only.

Commit 1be1802

Browse files
committed
Use Node-0.10-compatible process.nextTick
1 parent 0a838ff commit 1be1802

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ Pool.prototype._promise = function (cb, executor) {
2828
}
2929

3030
function resolved (value) {
31-
process.nextTick(cb, null, value)
31+
process.nextTick(function () {
32+
cb(null, value)
33+
})
3234
}
3335

3436
function rejected (error) {
35-
process.nextTick(cb, error)
37+
process.nextTick(function () {
38+
cb(error)
39+
})
3640
}
3741

3842
executor(resolved, rejected)

0 commit comments

Comments
 (0)