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.

@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
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
@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
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