Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
stream: fix comments for sync flag of ReadableState
It seems that the comments for sync flag of ReadableState is
copied from WritableState without modification.
  • Loading branch information
Wang Xinyong committed Feb 3, 2017
commit 53154091bc5adaa6724b91a2174a30843adc4a93
8 changes: 4 additions & 4 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function ReadableState(options, stream) {
this.endEmitted = false;
this.reading = false;

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

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