We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64c7800 commit 1f13497Copy full SHA for 1f13497
JavaScript/6-blocking.js
@@ -53,7 +53,7 @@ if (isMainThread) {
53
setTimeout(() => {
54
mutex.leave();
55
console.log(`Leave ${threadId}`);
56
- loop();
+ setTimeout(loop, 0);
57
}, 5000);
58
};
59
loop();
JavaScript/7-spin-lock.js
@@ -53,14 +53,14 @@ if (isMainThread) {
console.log(`Interval ${threadId}`);
}, 500);
- const f = async () => {
+ const loop = async () => {
await mutex.enter();
console.log(`Enter ${threadId}`);
60
61
62
- f();
63
64
65
+ loop();
66
}
0 commit comments