( self_: RcRef.RcRef<A, E> )
| 178 | |
| 179 | /** @internal */ |
| 180 | export const invalidate = <A, E>( |
| 181 | self_: RcRef.RcRef<A, E> |
| 182 | ): Effect.Effect<void> => { |
| 183 | const self = self_ as RcRefImpl<A, E> |
| 184 | return Effect.uninterruptible(Effect.suspend(() => { |
| 185 | if (self.state._tag !== "Acquired") { |
| 186 | return Effect.void |
| 187 | } |
| 188 | const state = self.state |
| 189 | self.state = stateEmpty |
| 190 | state.invalidated = true |
| 191 | if (state.refCount > 0) { |
| 192 | return Effect.void |
| 193 | } |
| 194 | state.fiber?.interruptUnsafe() |
| 195 | return Scope.close(state.scope, Exit.void) |
| 196 | })) |
| 197 | } |
nothing calls this directly
no test coverage detected