[Pkg-javascript-commits] [node-leveldown] 135/492: process.nextTick->setImmediate, Node 0.9.5 compat

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit 81232a3893f2499ca2440ca3ce3f2b6fb8dc490b
Author: Rod Vagg <rod at vagg.org>
Date:   Sun Dec 30 16:35:28 2012 +1100

    process.nextTick->setImmediate, Node 0.9.5 compat
---
 lib/read-stream.js  | 2 +-
 lib/write-stream.js | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/read-stream.js b/lib/read-stream.js
index eea8e65..023110e 100644
--- a/lib/read-stream.js
+++ b/lib/read-stream.js
@@ -63,7 +63,7 @@ function ReadStream (options, db, iteratorFactory) {
   }.bind(this)
 
   if (db.isOpen())
-    process.nextTick(ready)
+    setImmediate(ready)
   else
     db.once('ready', ready)
 }
diff --git a/lib/write-stream.js b/lib/write-stream.js
index 31869d2..f8bdd51 100644
--- a/lib/write-stream.js
+++ b/lib/write-stream.js
@@ -27,7 +27,7 @@ function WriteStream (options, db) {
   }.bind(this)
 
   if (db.isOpen())
-    process.nextTick(ready)
+    setImmediate(ready)
   else
     db.once('ready', ready)
 }
@@ -47,7 +47,7 @@ WriteStream.prototype = {
     }
 
   , end: function() {
-      process.nextTick(function () {
+      setImmediate(function () {
         this._end = true
         this._process()
       }.bind(this))
@@ -73,7 +73,7 @@ WriteStream.prototype = {
     }
 
   , _processDelayed: function() {
-      process.nextTick(this._process.bind(this))
+      setImmediate(this._process.bind(this))
     }
 
   , _process: function() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list