Sobes.tech
Junior — Senior

Analysis of the order of execution of asynchronous calls in C#

livecode

Task condition

How will the execution of the presented fragment proceed and what delays will occur?

var operation = PerformAsync();
Thread.Sleep(2000);

await operation;

static async Task PerformAsync()
{
    await Task.Delay(100);
}