MCPcopy Index your code
hub / github.com/Effect-TS/effect / withPermitsScoped

Function withPermitsScoped

packages/effect/test/Stream/sequencing.test.ts:16–20  ·  view source on GitHub ↗
(permits: number)

Source from the content-addressed store, hash-verified

14import * as Take from "effect/Take"
15
16const withPermitsScoped = (permits: number) => (semaphore: Effect.Semaphore) =>
17 Effect.acquireRelease(
18 semaphore.take(permits),
19 (n) => semaphore.release(n)
20 )
21
22describe("Stream", () => {
23 it.effect("branchAfter - switches streams", () =>

Callers 2

sequencing.test.tsFile · 0.85
withPermitScopedFunction · 0.85

Calls 2

releaseMethod · 0.80
takeMethod · 0.65

Tested by

no test coverage detected