Skip to content

Commit

Permalink
fix: allow interruptions to be expressed in the state
Browse files Browse the repository at this point in the history
  • Loading branch information
datner committed Feb 7, 2024
1 parent 1d6a8e0 commit dde7a40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-ads-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect-rx/rx": patch
---

Acknowledge interruptions
4 changes: 1 addition & 3 deletions packages/rx/src/Rx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,7 @@ function makeEffect<E, A>(
const cancel = runCallbackSync(runtime)(
scopedEffect,
function(exit) {
if (!Exit.isInterrupted(exit)) {
ctx.setSelfSync(Result.fromExitWithPrevious(exit, previous))
}
ctx.setSelfSync(Result.fromExitWithPrevious(exit, previous))
}
)
if (cancel !== undefined) {
Expand Down

0 comments on commit dde7a40

Please sign in to comment.