Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer use global setImmediate function due to performance issues #335

Merged
merged 1 commit into from
Jan 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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