private async void OnButton4_Click(object sender, RoutedEventArgs e) { MakeBtnRed(sender); var checker = new StatusChecker(); checker.StatusUpdated = false; //await checker.UpdateStatus().ConfigureAwait(false); // this one does not hang and sees the right value //Task www = checker.UpdateStatus(); // this one hangs forever Task.Run(delegate { return checker.UpdateStatus(); }); // this one hangs forever while (!checker.StatusUpdated || _isGetOut) ; MakeBtnGreen(sender); }