-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
CR BlockingNeeds to resolved for Candidate RecommendationNeeds to resolved for Candidate Recommendation
Description
The usual pattern is to update a read-only attribute value and synchronously fire the corresponding event.
This is not the case for decoders/encoders, I wonder why. Note this means that the timing where the control messages are run is somehow observable to JS.
Also, now that we execute the error callback synchronously as part of the close encoder/decoder algorithm, the corresponding dequeue event is fired in a task after the error callback execution. This might be a bit surprising to applications.
I wonder whether we could consider something along those lines:
- In case of reset/close with non AbortError, fire the dequeue event synchronously so that it happens just before the error callback execution.
- In case of AbortError reset/closure, do not fire the dequeue event (the app triggered reset/close so does not really need a dequeue event).
- In case of close being called by the web application between the time the dequeue event task is scheduled and the time the task runs, do not fire the dequeue event. The same approach could be useful for reset as well but might require introducing more states.
Metadata
Metadata
Assignees
Labels
CR BlockingNeeds to resolved for Candidate RecommendationNeeds to resolved for Candidate Recommendation