dotnet / dotnet/dotnet-api-docs
Will an unreferenced Delay task get canceled during garbage collection?
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
I just posted this [same question](https://stackoverflow.com/q/52840506/145173) to StackOverFlow. These `Delay` docs don't seem to cover the topic, but I figured some TPL overview doc page might answer the question as part of a broader task lifetime discussion. Then I realized that even if that's the case, these docs should link to such a discussion. One way or another, the lifetime rules for the delay task should be readily discoverable when starting from this API page.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 6ec08720-a8de-c325-20d4-7735044afa5a
* Version Independent ID: e3828f5f-0390-8640-3e1d-518b1f08145a
* Content: [Task.Delay Method (System.Threading.Tasks)](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.delay?redirectedfrom=MSDN&view=netframework-4.7.2#System_Threading_Tasks_Task_Delay_System_TimeSpan_System_Threading_CancellationToken_)
* Content Source: [xml/System.Threading.Tasks/Task.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Threading.Tasks/Task.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.