Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MultithreadedJSBook/code-samples
/ exec
Method
exec
ch6-mutex/mutex.js:29–36 ·
view source on GitHub ↗
(fn)
Source
from the content-addressed store, hash-verified
27
}
28
29
exec(fn) {
30
this.acquire();
31
try {
32
return
fn();
33
} finally {
34
this.release();
35
}
36
}
37
}
38
39
module.exports = Mutex;
Callers
3
thread-product-mutex.js
File · 0.45
write
Method · 0.45
read
Method · 0.45
Calls
2
acquire
Method · 0.95
release
Method · 0.95
Tested by
no test coverage detected