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

Function firstHealthyAvailable

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

Source from the content-addressed store, hash-verified

730}
731
732const firstHealthyAvailable = <A, E>(self: Pool<A, E>): PoolItem<A, E> | undefined => {
733 let item = self.state.availableHead
734 while (item !== undefined && item.exit._tag === "Failure") item = item.availableNext
735 return item
736}
737
738// The failure count when each kept failure was recorded.
739const failedAt = new WeakMap<PoolItem<unknown, unknown>, number>()

Callers 3

getSlowWithFunction · 0.85
waitForItemFunction · 0.85
failureRecipientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected