No-freezes alternative to Thread.Sleep for waiting inside a Task [duplicate]
问题 This question already has answers here : Wpf Label not being updated when using Thread.Sleep() (3 answers) Closed 5 years ago . I have to call a web API that works as follows : upload a song request a particular analysis on that song wait that the process is finished retrieve and return the result I am having a problem with no. 3, I've tried Thread.Sleep but that freezes the UI. How can I wait in a task without freezing the UI ? public override async Task Execute(Progress<double> progress,