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

Function failureRecipient

packages/effect/src/Pool.ts:834–835  ·  view source on GitHub ↗
(self: Pool<A, E>)

Source from the content-addressed store, hash-verified

832// The borrower a failed acquisition is delivered to: the first one asleep,
833// unless a healthy item can serve it instead.
834const failureRecipient = <A, E>(self: Pool<A, E>) =>
835 firstHealthyAvailable(self) === undefined ? firstSleepingWaiter(self) : undefined
836
837// Reservations prevent reuse without extending the lifetime of borrowed items.
838const reservations = new WeakMap<PoolItem<unknown, unknown>, number>()

Callers 1

allocateFunction · 0.85

Calls 2

firstHealthyAvailableFunction · 0.85
firstSleepingWaiterFunction · 0.85

Tested by

no test coverage detected