-
Couldn't load subscription status.
- Fork 1.4k
Add a promise poll to ZStream#interruptWhen #4166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| _ <- halt.fail("Fail") | ||
| result <- ZStream(1) | ||
| .haltWhen(halt) | ||
| .interruptWhen(halt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
|
This appears to break on Scala.js. Could you look into that? |
313dea6 to
c2dc14e
Compare
|
@iravid done, |
c2dc14e to
e77470d
Compare
| ) | ||
| as <- self.process | ||
| done <- Ref.makeManaged(false) | ||
| asPull = p.await.asSomeError *> done.set(true) *> Pull.end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I compared with my suggestion here and that one got #4119 right, but would also experience #4118
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svroonland are you sure? it checks on every pull whether the promise is done and there's a unit test for that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luis3m Ah yes on closer look, you are right. So they would appear to be equivalent then..? (just for learning purposes, you can disregard this comment thread when it comes to this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svroonland no worries. Yes, they are.
|
Thank you @luis3m! |
Closes #4118
Closes #4119