Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use setImmediate where available instead of nextTick.
  • Loading branch information
Chakrit Wichian committed Jul 22, 2013
1 parent f576cab commit 4a0f216
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/jam.js
Expand Up @@ -2,8 +2,12 @@
// lib/jam.js - Main JAM entrypoint
module.exports = (function() {

var assert = require('assert')
, tick = process.nextTick;
var assert = require('assert'), tick = null;

// find out what is our best option for next tick
tick = setImmediate || (process && process.nextTick) || function(func) {
setTimeout(func, 0);
};

// # INTERNAL HELPERS

Expand Down

0 comments on commit 4a0f216

Please sign in to comment.