()
| 3404 | Effect.sync(() => { |
| 3405 | let currentPull: Pull.Pull<OutElem, E, OutDone2, Env | R> | undefined |
| 3406 | const makePull = (): Pull.Pull<OutElem, E, OutDone2, Env | R> => { |
| 3407 | const runScope = Scope.forkUnsafe(scope) |
| 3408 | return Effect.flatMap(toTransform(self)(upstream, runScope), (pull) => { |
| 3409 | currentPull = Effect.catchCause(pull, (cause) => { |
| 3410 | const exit = Pull.doneExitFromCause(cause) as Exit.Exit<OutDone, OutErr> |
| 3411 | return Scope.close(runScope, exit).pipe( |
| 3412 | Effect.flatMap(() => onExit(exit, scope)), |
| 3413 | Effect.flatMap(makePull) |
| 3414 | ) |
| 3415 | }) |
| 3416 | return currentPull |
| 3417 | }) |
| 3418 | } |
| 3419 | return Effect.suspend(() => currentPull ?? makePull()) |
| 3420 | }) |
| 3421 | ) |
no test coverage detected