Skip to content

Commit

Permalink
reconcile if waiters
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed May 28, 2024
1 parent d476d97 commit 55d41d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/effect/src/internal/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ class PoolImpl<A, E> implements Pool<A, E> {
if (poolItem.refCount === 0) {
this.items.delete(poolItem)
this.invalidated.delete(poolItem)
return poolItem.finalizer
return this.waiters > 0
? Effect.zipRight(poolItem.finalizer, this.reconcile)
: poolItem.finalizer
}
this.invalidated.add(poolItem)
return Effect.void
Expand Down

0 comments on commit 55d41d9

Please sign in to comment.