Skip to content

Mention TaskToAsyncResult in "Implement the APM pattern by using tasks" #47718

@KalleOlaviNiemitalo

Description

@KalleOlaviNiemitalo

Type of issue

Missing information

Description

In the "Implement the APM pattern by using tasks" section of the "TPL and traditional .NET asynchronous programming" topic, it would be useful to mention the System.Threading.Tasks.TaskToAsyncResult class, and explain how its behaviour differs from the Task<string>.Factory.StartNew example.

TaskToAsyncResult is available starting from .NET 8.0. The idea of publishing it for downlevel frameworks too was mentioned in dotnet/runtime#61729 (comment) but AFAIK it has not been done.

Page URL

https://learn.microsoft.com/en-gb/dotnet/standard/parallel-programming/tpl-and-traditional-async-programming

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/parallel-programming/tpl-and-traditional-async-programming.md

Document Version Independent Id

b7239ee4-3f1b-45da-b671-737fce0536c0

Platform Id

1a06847a-1003-9404-b237-1562858256c5

Article author

@IEvangelist

Metadata

  • ID: fcee7199-2d8d-efe7-d5d0-5599f4f0019d
  • PlatformId: 1a06847a-1003-9404-b237-1562858256c5
  • Service: dotnet-fundamentals

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions