I have two tasks, and I wait them to be finished with
await Task.WhenAll
Can it be a problem to get after that the value directly by calling .Result
I am sure that the tasks are already finished.
`
Task<int> t1 = Task.FromResult(1);
Task<int> t2 = Task.FromResult(2);
await Task.WhenAll(t1, t2);
var uuu = t1.Result;
// or var uuu = await t1;
`
The problem is that visual studio set a VSTHRD103 Call async methods when in an async method
warning.
I checked with sharplab
and .Result version jit is a bit smaller.
Can I get any deadlock if I call .Result
after that I already await them with Task.WhenAll
?