dotnet / dotnet/dotnet-api-docs

Improve discoverability of effect of a suspended system on delay

Open
#3,850 0 comments 0 reactions 0 assignees View on GitHub
area-System.Threading.Tasks Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

The documentation for `Task.Delay` does not specify its behavior when the system is suspended, nor do its docs link to external docs on the topic. One way or another, it should be easy for a developer to discover what the behavior will be.

I had submitted PR #2354 to specify the suspend behavior directly in the `Task.Delay` docs, to which @stephentoub suggested a different approach:

> I'm fine personally with it being documented, but Task.Delay isn't the place to do it IMO. If we want to document suspension behavior, we should do it on System.Threading.Timer, and then we could say in Task.Delay's docs that it has the same behavior as Timer.

This issue captures the need for a PR of that sort.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.