Skip to content

Developers can await a Task with a timeout #27723

@AArnott

Description

@AArnott

A very popular StackOverflow Q&A asks how to await a Task with a timeout. A simple Task.WithTimeout(TimeSpan) method would alleviate a lot of time developers spend looking for how to properly do this, and avoid doing it wrong (e.g. leaving timers for finalization).

See how we offer a WithTimeout extension method from vs-threading.

Metadata

Metadata

Labels

Bottom Up WorkNot part of a theme, epic, or user storyCost:MWork that requires one engineer up to 2 weeksPriority:3Work that is nice to haveTeam:LibrariesUser StoryA single user-facing feature. Can be grouped under an epic.api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.Threading.Tasks

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions