async-task icon indicating copy to clipboard operation
async-task copied to clipboard

Dummy task

Open MiniaczQ opened this issue 2 years ago • 0 comments

Ability to create an already completed Task with something like Task::completed(...).

This would serve as a way to mock asynchronous functionality with synchronous code.

My specific use case is an interface which has to return a Task, but the actual code doesn't have a way to create said Task.
(I don't think this solution can be called sound, but it is what it is)
source

This is very much inspired by C#.

MiniaczQ avatar Oct 10 '22 22:10 MiniaczQ