MCPcopy
hub / github.com/Effect-TS/effect / invalidatePoolItem

Method invalidatePoolItem

packages/effect/src/internal/pool.ts:298–315  ·  view source on GitHub ↗
(poolItem: PoolItem<A, E>)

Source from the content-addressed store, hash-verified

296 }
297
298 invalidatePoolItem(poolItem: PoolItem<A, E>): Effect<void> {
299 return core.suspend(() => {
300 if (!this.items.has(poolItem)) {
301 return core.void
302 } else if (poolItem.refCount === 0) {
303 this.items.delete(poolItem)
304 this.available.delete(poolItem)
305 this.invalidated.delete(poolItem)
306 return core.zipRight(
307 poolItem.finalizer,
308 circular.forkIn(core.interruptible(this.resize), this.scope)
309 )
310 }
311 this.invalidated.add(poolItem)
312 this.available.delete(poolItem)
313 return core.void
314 })
315 }
316
317 get shutdown(): Effect<void> {
318 return core.suspend(() => {

Callers 4

PoolImplClass · 0.95
invalidateMethod · 0.95
processFunction · 0.80
strategyUsageTTLFunction · 0.80

Calls 1

addMethod · 0.65

Tested by

no test coverage detected