()
| 3361 | }) |
| 3362 | } |
| 3363 | get fork() { |
| 3364 | return sync(() => { |
| 3365 | const newScope = new MicroScopeImpl() |
| 3366 | if (this.state._tag === "Closed") { |
| 3367 | newScope.state = this.state |
| 3368 | return newScope |
| 3369 | } |
| 3370 | function fin(exit: MicroExit<any, any>) { |
| 3371 | return newScope.close(exit) |
| 3372 | } |
| 3373 | this.state.finalizers.add(fin) |
| 3374 | newScope.unsafeAddFinalizer((_) => sync(() => this.unsafeRemoveFinalizer(fin))) |
| 3375 | return newScope |
| 3376 | }) |
| 3377 | } |
| 3378 | } |
| 3379 | |
| 3380 | /** |
nothing calls this directly
no test coverage detected