Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix FileStream.FlushAsync documentation to correctly describe its behavior#11471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gewarren merged 4 commits intomainfromcopilot/fix-11433
Jun 30, 2025

Conversation

Copilot
Copy link
Contributor

@CopilotCopilotAI commentedJun 19, 2025
edited
Loading

The documentation forFileStream.FlushAsync(CancellationToken) incorrectly stated that it "causes any buffered data to be written to the underlying device". This is inaccurate based on the behavior change implemented indotnet/coreclr#24902.

Issue

The current documentation was misleading because:

  • FlushAsync() behaves likeFlush()/Flush(false) - it only flushes .NET stream buffers to the file
  • It doesnot flush intermediate OS file buffers to the underlying storage device
  • OnlyFlush(true) actually performs the expensive operation of flushing OS buffers to disk

Changes

  • Updated the summary to remove "underlying device" and clarify it writes "to the file"
  • Added explicit documentation in the remarks section explaining that this method only flushes .NET stream buffers
  • Added guidance to useFlush(true) when flushing to the underlying storage device is required

This ensures developers have accurate expectations about the performance and behavior ofFlushAsync() versusFlush(true).

Fixes#11433.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Clickhere to start the survey.

…o underlying deviceCo-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
@CopilotCopilotAI changed the title[WIP] FileStream.FlushAsync(CancellationToken) doesn't actually flush to the underlying deviceFix FileStream.FlushAsync documentation to correctly describe its behaviorJun 19, 2025
@CopilotCopilotAI requested a review fromjeffhandleyJune 19, 2025 05:38
Copilot finished work on behalf ofjeffhandleyJune 19, 2025 05:38
@jeffhandleyjeffhandley marked this pull request as ready for reviewJune 19, 2025 05:54
@jeffhandleyjeffhandley requested a review froma team as acode ownerJune 19, 2025 05:54
@jeffhandleyjeffhandley requested review fromstephentoub anda team and removed request fora teamJune 19, 2025 05:55
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
auto-merge was automatically disabledJune 30, 2025 13:41

Head branch was pushed to by a user without write access

@CopilotCopilotAI requested a review fromgewarrenJune 30, 2025 13:42
Copilot finished work on behalf ofgewarrenJune 30, 2025 13:42
@gewarrengewarrenenabled auto-merge (squash)June 30, 2025 14:08
@gewarrengewarren merged commitc5eea03 intomainJun 30, 2025
5 checks passed
@gewarrengewarren deleted the copilot/fix-11433 branchJune 30, 2025 14:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jeffhandleyjeffhandleyjeffhandley approved these changes

@gewarrengewarrengewarren approved these changes

@stephentoubstephentoubAwaiting requested review from stephentoub

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

FileStream.FlushAsync(CancellationToken) doesn't actually flush to the underlying device
3 participants
@Copilot@jeffhandley@gewarren

[8]ページ先頭

©2009-2025 Movatter.jp