Alexander.It
Alexander.It

Reputation: 187

Is StreamReader.Read() a blocking method?

Is StreamReader.Read() a blocking method especially if applied to a NetworkStream?

Upvotes: 1

Views: 1573

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1499900

Yes - it blocks until one of the follow conditions is satisfied:

  • A character is read
  • The end of the underlying stream is reached
  • The underlying stream throws an exception

Upvotes: 6

Related Questions