Repository navigation
Web Streams: reject pending reads when releasing reader #41506
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Jan 13, 2022 - changed the title
[-]Streams: reject pending reads when releasing reader[/-][+]Web Streams: reject pending reads when releasing reader[/+]on Jan 13, 2022 - addedweb streamsIssues and PRs related to the Web Streams API.Issues and PRs related to the Web Streams API.
on Jan 14, 2022 Hello. Every time I run
reader.releaseLock(), an error is generated at any time, even on a newly created stream
TypeError [ERR_INVALID_STATE]: Invalid state: Reader released@essential-existence I suggest you open a separate issue for that. This issue is about implementing a change to
releaseLock().That said, I am a bit curious. That error appears as the rejection reason for
reader.closed, but that promise is always marked as handled so it shouldn't cause an unhandled rejection. Unless your code is doing something else withreader.closed, perhaps? I recommend you add some example code when opening a new issue. 😉Great to see this change landed in the spec! Definitely will be nice to get this behavior implemented.
@essential-existence I suggest you open a separate issue for that. This issue is about implementing a change to
releaseLock().That said, I am a bit curious. That error appears as the rejection reason for
reader.closed, but that promise is always marked as handled so it shouldn't cause an unhandled rejection. Unless your code is doing something else withreader.closed, perhaps? I recommend you add some example code when opening a new issue. 😉Yes, indeed, without affecting
closedno error is generated. I opened an issue.There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Aug 5, 2022 Thank you auto-close bot bit I think this one needs to stay open for a bit still (unless it has already been resolved?)
Reacted by Robert Nagy and Mattias Buelens- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Aug 6, 2022 There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Feb 2, 2023 - removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Feb 3, 2023
Previously, calling
ReadableStreamDefaultReader.releaseLock()orReadableStreamBYOBReader.releaseLock()while there are pendingread()requests would throw aTypeError.The specification has been changed to allow this case, and to reject such pending
read()requests instead.Standard change: whatwg/streams#1168
Tests: web-platform-tests/wpt#32072