Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/scriptscat/scriptcat
/ acquire
Method
acquire
src/pkg/utils/concurrency-control.ts:9–15 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
7
}
8
9
async
acquire() {
10
if
(this.active >= this.limit) {
11
await
new
Promise<void>((resolve) => this.queue.push(resolve));
12
return
;
13
}
14
this.active++;
15
}
16
17
release() {
18
if
(this.active > 0) {
Callers
4
concurrency-control.test.ts
File · 0.80
task
Function · 0.80
run
Function · 0.80
createResourceByUrlFetch
Method · 0.80
Calls
1
push
Method · 0.80
Tested by
2
task
Function · 0.64
run
Function · 0.64