2
The class TaskCompletionSource<TResult>
needs a type TResult
. That way, when I need to use this class without having a return type (void
), I have to do something like:
var tcs = new TaskCompletionSource<object>();
// ...
tcs.TrySetResult(null);
I don’t know if this is the best way to do when the return of a function is only one Task
, of no kind. It seems to me.
There is no TaskCompletionSource
without the type parameter? There is another output?
I already knew Stephen by Soen, but I didn’t know that it was a reference of asynchrony in .NET. I will read some of his things.
– vinibrsl
He’s an expert. Of course there’s Jon Skeet and others. There’s people from the team. NET as Jared Parsons, had the compiler’s Eric Lippert who talks a lot about the more conceptual part and how the compiler deals with it. Joe Duffy was the guy who created all the homework.
– Maniero