MCPcopy Index your code
hub / github.com/Effect-TS/effect / process

Function process

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

Source from the content-addressed store, hash-verified

357 return identity<Strategy<A, E>>({
358 run: (pool) => {
359 const process = (item: PoolItem<A, E>): Effect<void> =>
360 core.suspend(() => {
361 if (!pool.items.has(item) || pool.invalidated.has(item)) {
362 return core.void
363 }
364 const now = clock.unsafeCurrentTimeMillis()
365 const created = creationTimes.get(item)!
366 const remaining = ttlMillis - (now - created)
367 return remaining > 0
368 ? coreEffect.delay(process(item), remaining)
369 : pool.invalidatePoolItem(item)
370 })
371 return queue.take.pipe(
372 core.tap(process),
373 coreEffect.forever

Callers

nothing calls this directly

Calls 3

invalidatePoolItemMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected