Skip to content

Commit

Permalink
Merge pull request #335 from Robert-Frampton/perf
Browse files Browse the repository at this point in the history
No longer use global setImmediate function due to performance issues
  • Loading branch information
jbalsas authored Jan 12, 2018
2 parents 37c8853 + 5308dee commit ac2ecac
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/metal/src/async/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@ async.nextTick = function(callback, context) {
cb = callback.bind(context);
}
cb = async.nextTick.wrapCallback_(cb);
// Introduced and currently only supported by IE10.
// Verify if variable is defined on the current runtime (i.e., node, browser).
// Can't use typeof enclosed in a function (such as core.isFunction) or an
// exception will be thrown when the function is called on an environment
// where the variable is undefined.
if (typeof setImmediate === 'function') {
setImmediate(cb);
return;
}
// Look for and cache the custom fallback version of setImmediate.
if (!async.nextTick.setImmediate_) {
// eslint-disable-next-line
Expand Down

0 comments on commit ac2ecac

Please sign in to comment.