Skip to content

TaskCompletionSource TrySetResult incorrectly states it will return false is the Task is disposed #8108

Open
@PaintThis

Description

@PaintThis

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 xref:System.Threading.Tasks.Task%601 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions