(self: Pool<A, E>)
| 421 | * @since 2.0.0 |
| 422 | */ |
| 423 | export const get = <A, E>(self: Pool<A, E>): Effect.Effect<A, E, Scope.Scope> => |
| 424 | Effect.suspend(() => { |
| 425 | if (self.state.isShuttingDown) { |
| 426 | return Effect.interrupt |
| 427 | } |
| 428 | return Effect.flatMap(getPoolItem(self), (item) => item.exit) |
| 429 | }) |
| 430 | |
| 431 | const getPoolItem = <A, E>(self: Pool<A, E>): Effect.Effect<PoolItem<A, E>, never, Scope.Scope> => |
| 432 | Effect.uninterruptibleMask((restore) => |
nothing calls this directly
no test coverage detected