(item: PoolItem<A, E>)
| 624 | return identity<Strategy<A, E>>({ |
| 625 | run: (pool) => { |
| 626 | const process = (item: PoolItem<A, E>): Effect.Effect<void> => |
| 627 | Effect.suspend(() => { |
| 628 | if (!pool.state.items.has(item) || pool.state.invalidated.has(item)) { |
| 629 | return Effect.void |
| 630 | } |
| 631 | const now = clock.currentTimeMillisUnsafe() |
| 632 | const created = creationTimes.get(item)! |
| 633 | const remaining = ttlMillis - (now - created) |
| 634 | return remaining > 0 |
| 635 | ? Effect.delay(process(item), remaining) |
| 636 | : invalidatePoolItem(pool, item) |
| 637 | }) |
| 638 | return Queue.take(queue).pipe( |
| 639 | Effect.tap(process), |
| 640 | Effect.forever({ disableYield: true }) |
nothing calls this directly
no test coverage detected