void SyncOverAsyncDeadlock_Resolved_TimeOut() { int timeout = 2; label1.Text = $"unresponsive for {timeout} seconds"; var t = AsyncAndThreading.Simulate(); t.Wait(TimeSpan.FromSeconds(timeout)); label1.Text = $"responsive again"; }
async Task SyncOverAsyncDeadlock_Resolved_v1() { await AsyncAndThreading.Simulate(3); }
// --------------------------------------------------------------------- void SyncOverAsyncDeadlock() { var t = AsyncAndThreading.Simulate(); t.Wait(); }