Skip to content

Commit

Permalink
fix: runFork with Scope should not run OOM (#1949)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS authored Jan 18, 2024
1 parent 7a786d4 commit 21b9edd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/blue-turkeys-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": patch
---

Fix runFork with Scope
2 changes: 1 addition & 1 deletion packages/effect/src/internal/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const unsafeFork = <R>(runtime: Runtime.Runtime<R>) =>
equals(id, fiberRuntime.id()) ? core.unit : core.interruptAsFiber(fiberRuntime, id)
)
),
core.onExit(effect, (exit) => _scope.close(closeableScope, exit))
core.onExit(self, (exit) => _scope.close(closeableScope, exit))
)
)
}
Expand Down

0 comments on commit 21b9edd

Please sign in to comment.