Skip to content
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

Stream.fromReadableStream leaves the ReadableStream in a locked state. #3774

Closed
skoshx opened this issue Oct 12, 2024 · 2 comments · Fixed by #3771
Closed

Stream.fromReadableStream leaves the ReadableStream in a locked state. #3774

skoshx opened this issue Oct 12, 2024 · 2 comments · Fixed by #3771
Labels
bug Something isn't working

Comments

@skoshx
Copy link

skoshx commented Oct 12, 2024

What version of Effect is running?

latest

What steps can reproduce the bug?

Reproduction in this Effect Playground

https://effect.website/play#bc147f507d11

What is the expected behavior?

Expected, that lock on the stream is released. Source code calls .cancel instead of .releaseLock.

What do you see instead?

Stream stays locked and is thus unusable a second time.

Additional information

No response

@skoshx skoshx added the bug Something isn't working label Oct 12, 2024
@tim-smart
Copy link
Contributor

tim-smart commented Oct 12, 2024

This is working as intended (https://effect.website/play#9b44cc8f15d0), but we can add an option to call .releaseLock instead, in the case you want to share a stream instead of finalizing it.

@skoshx
Copy link
Author

skoshx commented Oct 12, 2024

Hey, yeah It seems so... Interestingly when I shared the Playground it was throwing errors... Not sure if it was just some bad state or what :D But yeah, that sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants