[Solved] Why is the Windows Forms UI blocked when executing Task with ContinueWith?

[ad_1] Since you already create (and save) your tasks, the easiest fix would be to await them for each iteration of your while loop: while (run) { action2(); foreach (Task t in continutask) await t; } That way, when all pings completed (successful or not) you start the entire process again – without delay. One … Read more