Home > Net >  Await Task. Delay (1000) led to the Task
Await Task. Delay (1000) led to the Task

Time:03-31

The Task Task=Task. Factory. StartNew (async ()=& gt;
{
While (true)
{
Await Task. Delay (1000);
}
}

Task. WaitAll (new Task [] {Task});

Results run to await Task. Delay (1000); Directly out of the while, leading to a Task. WaitAll finished, what's going on,
Await Task. Delay (1000); To the Thread. Sleep (1000) is normal
  •  Tags:  
  • C#
  • Related