-
Notifications
You must be signed in to change notification settings - Fork 6k
Add documentation for synchronous access to asynchronous operations #47735
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: BillWagner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start, I have a few comments.
@copilot address the review comments. |
Co-authored-by: BillWagner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ready for final review.
Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Genevieve Warren <[email protected]>
PoliCheck Scan ReportThe following reports lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a comment that you post to the PR. The feedback helps reduce false positive instances in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
PoliCheck Scan ReportThe following reports lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a comment that you post to the PR. The feedback helps reduce false positive instances in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
1 similar comment
PoliCheck Scan ReportThe following reports lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a comment that you post to the PR. The feedback helps reduce false positive instances in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Co-authored-by: BillWagner <[email protected]>
PoliCheck Scan ReportThe following reports lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a comment that you post to the PR. The feedback helps reduce false positive instances in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
This PR addresses the common scenario where developers need to call asynchronous methods but cannot use
await
throughout their call stack. This situation often occurs in legacy codebases or when integrating async methods into synchronous APIs.The new section "Synchronous access to asynchronous operations" provides practical guidance on:
AggregateException
The documentation includes:
async
/await
throughout the call stack remains the preferred solutionThis enhancement follows the guidance from @stephentoub and @BillWagner to provide practical options while keeping "dangerous" patterns appropriately cautioned with clear warnings about their risks.
Fixes #37040.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Internal previews