Skip to content

Commit

Permalink
remove call to Task.Run() - refs #4
Browse files Browse the repository at this point in the history
  • Loading branch information
grantwinney committed Sep 19, 2024
1 parent e86f2d4 commit 4f3e654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Threading/AsyncAwait/AsyncAwait/frmResponsiveModal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private async void btnMultipleThreads_Click(object sender, EventArgs e)
};

var bmt = new BreakfastMultipleThreads(progress);
await Task.Run(() => bmt.MakeBreakfastAsync());
await bmt.MakeBreakfastAsync();

btnMultipleThreads.Enabled = true;
prgMultipleThreads.Hide();
Expand All @@ -90,7 +90,7 @@ private async void btnMultipleThreadsHeavy_Click(object sender, EventArgs e)
};

var bhr = new BreakfastHeavilyDigested(progress);
await Task.Run(() => bhr.MakeBreakfastAsync());
await bhr.MakeBreakfastAsync();

btnMultipleThreadsHeavy.Enabled = true;
prgMultipleThreadsHeavy.Hide();
Expand Down

0 comments on commit 4f3e654

Please sign in to comment.