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

Method withPermit

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

* Runs an effect with the given number of permits and releases the permits * when the effect completes. * * **When to use** * * Use to run an effect while holding exactly one semaphore permit. * * **Details** * * This function acquires the specified number of permits befor

(self: Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

97 * are released by other tasks.
98 */
99 withPermit<A, E, R>(self: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>
100
101 /**
102 * Runs an effect only if the specified number of permits are immediately

Callers 15

PgClient.tsFile · 0.80
fromClientFunction · 0.80
runFunction · 0.80
Semaphore.test.tsFile · 0.80
ScopedRef.tsFile · 0.80
Semaphore.tsFile · 0.80
SubscriptionRef.tsFile · 0.80
SynchronizedRef.tsFile · 0.80
makeWithTransactionFunction · 0.80

Implementers 1

SemaphoreImplpackages/effect/src/Semaphore.ts

Calls

no outgoing calls

Tested by

no test coverage detected