Skip to content

Commit 202b07f

Browse files
Wang Xinyongmcollina
Wang Xinyong
authored andcommitted
stream: fix comment for sync flag of ReadableState
It seems that the comment for sync flag of ReadableState is copied from WritableState without modification. PR-URL: #11139 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 1004b9b commit 202b07f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/_stream_readable.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ function ReadableState(options, stream) {
6363
this.endEmitted = false;
6464
this.reading = false;
6565

66-
// a flag to be able to tell if the onwrite cb is called immediately,
67-
// or on a later tick. We set this to true at first, because any
68-
// actions that shouldn't happen until "later" should generally also
69-
// not happen before the first write call.
66+
// a flag to be able to tell if the event 'readable'/'data' is emitted
67+
// immediately, or on a later tick. We set this to true at first, because
68+
// any actions that shouldn't happen until "later" should generally also
69+
// not happen before the first read call.
7070
this.sync = true;
7171

7272
// whenever we return null, then we set a flag to say

0 commit comments

Comments
 (0)