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

Function resize

packages/effect/src/Pool.ts:1067–1068  ·  view source on GitHub ↗
(self: Pool<A, E>, failures?: number)

Source from the content-addressed store, hash-verified

1065// `failures` is the failure count when a borrower requested the resize or the
1066// previous pass ran. Startup and invalidation refills omit it.
1067const resize = <A, E>(self: Pool<A, E>, failures?: number): Effect.Effect<void> =>
1068 self.state.resizeSemaphore.withPermits(1)(resizeLoop(self, failures))
1069
1070const resizeLoop = <A, E>(self: Pool<A, E>, failures: number | undefined): Effect.Effect<void> =>
1071 Effect.suspend(() => {

Callers 3

makeWithStrategyFunction · 0.70
getSlowWithFunction · 0.70
invalidatePoolItemFunction · 0.70

Calls 2

resizeLoopFunction · 0.85
withPermitsMethod · 0.65

Tested by

no test coverage detected