I understand async/await doesn't use real parallelism, and it can be used to better take advantage of the resources of a thread through concurrency. Also, I know I can create concurrency in a method by using "await" like this:
static async Task Main(string[] args)
{
var task1= DoTask1Async(2);
DoSomething();
await task1;
}
On the other hand, the code below doesn't generate concurrency, it will be executed in a similar way to the conventional one (not using async/await). But is this technique useful for the system as a whole (the thread could be better used by other tasks), or is this code just useless?
static async Task Main(string[] args)
{
await DoTask1Async(2);
DoSomething();
}