effect-io-ai

Package: effect
Module: Pool

Pool.PoolItem

Internal record for a value managed by a Pool.

When to use

Use when implementing a custom pool Strategy that needs to inspect acquired items, track reference counts, or return reclaimable items to the pool.

Details

Each item stores the acquisition Exit, its finalizer, the current reference count, and whether automatic reclaiming has been disabled because the item was invalidated.

See

Signature

export interface PoolItem<A, E> {
  readonly exit: Exit.Exit<A, E>
  finalizer: Effect.Effect<void>
  refCount: number
  disableReclaim: boolean
}

Source

Since v4.0.0