( self: Complete<Key, Value, Error> )
| 144 | |
| 145 | /** @internal */ |
| 146 | export const toScoped = <Key, Value, Error = never>( |
| 147 | self: Complete<Key, Value, Error> |
| 148 | ): Effect.Effect<Value, Error, Scope.Scope> => |
| 149 | Exit.matchEffect(self.exit, { |
| 150 | onFailure: (cause) => core.failCause(cause), |
| 151 | onSuccess: ([value]) => |
| 152 | fiberRuntime.acquireRelease( |
| 153 | core.as(core.sync(() => MutableRef.incrementAndGet(self.ownerCount)), value), |
| 154 | () => releaseOwner(self) |
| 155 | ) |
| 156 | }) |
| 157 | |
| 158 | /** @internal */ |
| 159 | export const releaseOwner = <Key, Value, Error = never>( |
no test coverage detected