MCPcopy Create free account
hub / github.com/Effect-TS/effect / take

Method take

packages/effect/src/Semaphore.ts:133–133  ·  view source on GitHub ↗

* Acquires the specified number of permits and returns the acquired permit * count, suspending the task if they are not yet available. Pending `take` * calls are scanned in registration order, but a request is served only when * enough permits are available, so a smaller later request may o

(this: Semaphore, permits: number)

Source from the content-addressed store, hash-verified

131 * Use to manually acquire permits for lower-level coordination protocols.
132 */
133 take(this: Semaphore, permits: number): Effect.Effect<number>
134
135 /**
136 * Acquires the specified number of permits only if they are immediately

Callers 1

Semaphore.tsFile · 0.65

Implementers 1

SemaphoreImplpackages/effect/src/Semaphore.ts

Calls

no outgoing calls

Tested by

no test coverage detected