( self: Cause.Cause<E> )
| 193 | |
| 194 | /** @internal */ |
| 195 | export const causeFilterInterruptors = <E>( |
| 196 | self: Cause.Cause<E> |
| 197 | ): Result.Result<Set<number>, Cause.Cause<E>> => { |
| 198 | let interruptors: Set<number> | undefined |
| 199 | for (let i = 0; i < self.reasons.length; i++) { |
| 200 | const f = self.reasons[i] |
| 201 | if (f._tag !== "Interrupt") continue |
| 202 | interruptors ??= new Set() |
| 203 | if (f.fiberId !== undefined) { |
| 204 | interruptors.add(f.fiberId) |
| 205 | } |
| 206 | } |
| 207 | return interruptors ? Result.succeed(interruptors) : Result.fail(self) |
| 208 | } |
| 209 | |
| 210 | /** @internal */ |
| 211 | export const causeInterruptors = <E>(self: Cause.Cause<E>): ReadonlySet<number> => { |
no test coverage detected