( self: Complete<Key, Value, Error> )
| 157 | |
| 158 | /** @internal */ |
| 159 | export const releaseOwner = <Key, Value, Error = never>( |
| 160 | self: Complete<Key, Value, Error> |
| 161 | ): Effect.Effect<void> => |
| 162 | Exit.matchEffect(self.exit, { |
| 163 | onFailure: () => core.void, |
| 164 | onSuccess: ([, finalizer]) => |
| 165 | core.flatMap( |
| 166 | core.sync(() => MutableRef.decrementAndGet(self.ownerCount)), |
| 167 | (numOwner) => effect.when(finalizer(Exit.void), () => numOwner === 0) |
| 168 | ) |
| 169 | }) |
| 170 | |
| 171 | /** @internal */ |
| 172 | const ScopedCacheSymbolKey = "effect/ScopedCache" |
no test coverage detected
searching dependent graphs…