MCPcopy
hub / github.com/simstudioai/sim / releaseSlot

Function releaseSlot

apps/sim/lib/core/async-jobs/backends/database.ts:68–80  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

66}
67
68function releaseSlot(key: string): void {
69 const s = semaphores.get(key)
70 if (!s) return
71 const next = s.waiters.shift()
72 if (next) {
73 next()
74 return
75 }
76 s.available += 1
77 if (s.available === s.limit) {
78 semaphores.delete(key)
79 }
80}
81
82export class DatabaseJobQueue implements JobQueueBackend {
83 async enqueue<TPayload>(

Callers 1

runInlineMethod · 0.85

Calls 3

shiftMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected