We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 783f360 commit b9180b3Copy full SHA for b9180b3
1 file changed
JavaScript/1-mutex.js
@@ -21,7 +21,7 @@ class Mutex {
21
}
22
23
leave() {
24
- if (!this.owner) return;
+ if (!this.owner) return false;
25
Atomics.store(this.lock, 0, UNLOCKED);
26
Atomics.notify(this.lock, 0, 1);
27
this.owner = false;
0 commit comments