MCPcopy Create free account
hub / github.com/effect-app/libs / withPermits

Method withPermits

repos/effect/packages/effect/src/Semaphore.ts:80–80  ·  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 a specified number of semaphore permits. * * **Details** * * This function acquires the specified number of pe

(this: Semaphore, permits: number)

Source from the content-addressed store, hash-verified

78 * the provided effect. Once the effect finishes, the permits are released.
79 * If insufficient permits are available, the function will wait until they
80 * are released by other tasks.
81 */
82 withPermits(this: Semaphore, permits: number): <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>
83

Callers 15

makeMemoryStoreIntFunction · 0.65
ensureStoreFunction · 0.65
makeDiskStoreIntFunction · 0.65
ensureStoreFunction · 0.65
makeContextMapFunction · 0.65
makeFunction · 0.65
makeFunction · 0.65
makeFunction · 0.65
fromClientFunction · 0.65
makeFunction · 0.65

Implementers 1

SemaphoreImplrepos/effect/packages/effect/src/Semap

Calls

no outgoing calls

Tested by

no test coverage detected