dotnet / dotnet/dotnet-api-docs
TaskCompletionSource TrySetResult incorrectly states it will return false is the Task is disposed
Open
area-System.Threading.Tasks
Pri3
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The below line also contradicts that it will actually throw a DisposedException if the Task is disposed.
This method also returns false if the underlying has already been disposed.
Checking this, seems to verify that it will throw instead of returning false:
https://referencesource.microsoft.com/#mscorlib/system/threading/Tasks/TaskCompletionSource.cs
Contributor guide
Assessment
This issue has not been assessed yet.