Skip to content

Commit

Permalink
Memfs: use microtask instead of macrotask
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Dec 17, 2020
1 parent 5ba35c7 commit 2a419d4
Show file tree
Hide file tree
Showing 3 changed files with 3,905 additions and 9,962 deletions.
11 changes: 11 additions & 0 deletions patches/memfs+3.2.0.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
diff --git a/node_modules/memfs/lib/setImmediate.js b/node_modules/memfs/lib/setImmediate.js
index d27ef23..d9c85d4 100644
--- a/node_modules/memfs/lib/setImmediate.js
+++ b/node_modules/memfs/lib/setImmediate.js
@@ -4,5 +4,5 @@ var _setImmediate;
if (typeof setImmediate === 'function')
_setImmediate = setImmediate.bind(global);
else
- _setImmediate = setTimeout.bind(global);
+ _setImmediate = (f) => Promise.resolve().then(f);
exports.default = _setImmediate;
diff --git a/node_modules/memfs/lib/volume.js b/node_modules/memfs/lib/volume.js
index 6dd4291..7c2cc29 100644
--- a/node_modules/memfs/lib/volume.js
Expand Down
2 changes: 1 addition & 1 deletion profile-stuttering.cpuprofile

Large diffs are not rendered by default.

Loading

0 comments on commit 2a419d4

Please sign in to comment.