Closed
Description
Add test coverage for:
stream._readableState.needReadable
stream._readableState.emittedReadable
stream._readableState.readableListening
stream._readableState.resumeScheduled
Lines 74 to 77 in 774146d
Those govern when and how we need to emit a 'readable'
event and resume the flow.
The state machine is definitely complex, feel free to ask questions, and look hard at the source code. We can also add comments on the meaning of all those state variables.
Part of #8644.
cc @Fishrock123