In a mobile application I have a potentially long async operation (multiple async network calls grouped in an async function).
_myClassField = myClient.DoANumberOfNetworkCallsAsync();
I execute the call right when the app starts, then I show the splash screen and the welcome screen and only at the first user interaction (e.g.: button press) I finally await on the task and make the user wait if the response is not ready.
public async Task<object> GetMyLongAwaitedObjectAsync()
{
return await _myClassField;
}
This method can be called multiple times and maybe from both UI and non UI threads.
Can this be a source of problems or it is a valid pattern?