For the asynchronous method:
public async Task<int> InnerAsync() { await Task.Delay(1000); return 123; }
And calling it through an intermediate method, should the intermediate method expect an asynchronous method (IntermediateA) or just return the task (intermediate)?
pubic async Task<int> IntermediateA() { return await InnerAsync(); } private Task<int> IntermediateB() { return InnerAsync(); }
As far as I can tell with the debugger, both seem the same, but it seems to me that IntermediateB should work better, avoiding another wait record on the destination machine.
Is it correct?
Mikez source share