-
Couldn't load subscription status.
- Fork 49.7k
[Flight] Use cacheController instead of abortListeners for Streams #33633
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
| } | ||
|
|
||
| function callOnAllReadyIfReady(request: Request): void { | ||
| if (request.abortableTasks.size === 0 && request.abortListeners.size === 0) { |
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.
We used to need to check the listener count because it's what kept the stream alive while we were waiting on entries from the stream. Now I just let the task stay open and let the task be abortable which just logs an error for the stream.
6f2ea9f to
0a95b1b
Compare
Now that we have
cacheSignal()we can just use that instead of theabortListenersconcept which was really just the same thing for cancelling the streams (ReadableStream, Blob, AsyncIterable).