I want to create a completed Task (not Task<T>). Is there something built into .NET to do this?
Task
Task<T>
A related question: Create a completed Task<T>
The newest version of .Net (v4.6) is adding just that, a built-in Task.CompletedTask:
Task completedTask = Task.CompletedTask;
That property is implemented as a no-lock singleton so you would almost always be using the same completed task.
2.1m questions
2.1m answers
60 comments
57.0k users