diff --git a/feature_store.js b/feature_store.js index 083928e..d4730e8 100644 --- a/feature_store.js +++ b/feature_store.js @@ -18,7 +18,7 @@ function InMemoryFeatureStore() { function callbackResult(cb, result) { cb = cb || noop; - setTimeout(function() { cb(result); }, 0); // ensure this is dispatched asynchronously + process.nextTick(cb.bind(null, result)); // ensure this is dispatched asynchronously } store.get = function(kind, key, cb) {