NET 10 Removes Implicit Flush in BufferedStream.WriteByte, Breaking Old Behavior
Microsoft has changed how BufferedStream.WriteByte works in .NET 10, removing an implicit call to Flush() on the underlying stream that previously triggered when the buffer reached its capacity boundary. Through .NET 9, writing a byte at that boundary would silently flush the wrapped stream, a side effect not present in other BufferedStream.Write methods. The .NET 10 change eliminates this inconsistency, meaning applications relying on that implicit flush may now miss expected behavior in custom streams, protocol adapters, or compressors. Microsoft has officially documented this as a behavioral breaking change in .NET 10 LTS. Developers are advised to call Flush() or FlushAsync() explicitly at logical record or batch boundaries rather than depending on internal buffer capacity limits.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in