Package: effect
Module: Pool
Retrieves an item from the pool in a scoped effect.
When to use
Use to borrow a pooled resource for the lifetime of the current scope so it is automatically returned when that scope closes.
Details
The returned effect waits for an available item when the pool is at capacity. If acquiring a new item fails, the effect fails with the acquisition error.
Gotchas
Retrying a failed get can repeat the acquisition attempt.
See
invalidate for removing an unhealthy item from future reuseSignature
declare const get: <A, E>(self: Pool<A, E>) => Effect.Effect<A, E, Scope.Scope>
Since v2.0.0