Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 3, 2025

Summary

Fixes the incorrect mention of threading with respect to asynchronous operations in the F# async expressions documentation.

Problem

The documentation at docs/fsharp/language-reference/async-expressions.md contained a misleading statement that suggested async computations are "often started on a background thread while execution continues on the current thread." This statement was incorrect and contradicted the accurate information provided elsewhere in the F# documentation.

As correctly explained in docs/fsharp/tutorials/async.md:

  • There is no affinity between an asynchronous computation and a thread, unless explicitly started on the current thread
  • Asynchronous programming in F# is not an abstraction for multi-threading
  • A computation may actually run on its caller's thread, depending on the nature of the work

Changes

Removed the misleading sentence from the Remarks section of async-expressions.md. The documentation now correctly states that async computations run "without blocking the current computation thread" without making false claims about automatic background thread creation.

The subsequent paragraph already provides accurate information about thread choices being dependent on the triggering function used (e.g., Async.StartImmediate for current thread vs. other options for background threads).

Impact

This change aligns the language reference documentation with the tutorial documentation and accurately represents how F# async works, preventing developers from having incorrect assumptions about thread behavior in asynchronous operations.

Closes #[issue number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Incorrect Mention of Threading With Respect to Asynchronous Operations</issue_title>
<issue_description>The following line present here - Asynchronous computations are often started on a background thread while execution continues on the current thread. is wrong or ambiguous. Because async operations when done right does not continue on a separate thread. It is even mentioned here in this section.

Let me know if my understanding is correct. If the answer is yes, then I can also send a PR to fix this. 😃


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Comments on the Issue (you are @copilot in this section)

Fixes #25076

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Internal previews

📄 File 🔗 Preview link
docs/fsharp/language-reference/async-expressions.md docs/fsharp/language-reference/async-expressions

@dotnet-policy-service dotnet-policy-service bot added okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. labels Oct 3, 2025
@Copilot Copilot AI changed the title [WIP] Incorrect Mention of Threading With Respect to Asynchronous Operations Remove misleading statement about background threads in F# async expressions Oct 3, 2025
@Copilot Copilot AI requested a review from BillWagner October 3, 2025 14:48
Copilot finished work on behalf of BillWagner October 3, 2025 14:48
Copy link
Member

@BillWagner BillWagner left a 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.

@BillWagner BillWagner marked this pull request as ready for review October 6, 2025 14:49
@BillWagner BillWagner requested review from a team as code owners October 6, 2025 14:49
@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 14:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR corrects misleading documentation about F# async expressions by removing an incorrect statement about threading behavior. The change aligns the language reference documentation with the tutorial documentation and accurately represents how F# async works.

  • Removed the misleading statement that async computations are "often started on a background thread"
  • Preserved accurate information about async computations running without blocking the current thread
  • Maintained the correct explanation about thread choices being dependent on the triggering function used

@BillWagner BillWagner requested a review from IEvangelist October 7, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fsharp/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Mention of Threading With Respect to Asynchronous Operations
2 participants