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

Method cleanMapValue

packages/effect/src/internal/scopedCache.ts:561–576  ·  view source on GitHub ↗
(mapValue: MapValue<Key, Value, Error> | undefined)

Source from the content-addressed store, hash-verified

559 }
560
561 cleanMapValue(mapValue: MapValue<Key, Value, Error> | undefined): Effect.Effect<void> {
562 if (mapValue === undefined) {
563 return core.void
564 }
565 switch (mapValue._tag) {
566 case "Complete": {
567 return releaseOwner(mapValue)
568 }
569 case "Pending": {
570 return core.void
571 }
572 case "Refreshing": {
573 return releaseOwner(mapValue.complete)
574 }
575 }
576 }
577
578 ensureMapSizeNotExceeded(key: cache_.MapKey<Key>): Effect.Effect<void> {
579 return fiberRuntime.forEachConcurrentDiscard(

Callers 2

lookupValueOfMethod · 0.95

Calls 1

releaseOwnerFunction · 0.85

Tested by

no test coverage detected