Skip to content

Commit 098b55a

Browse files
committed
use async
1 parent bd12b93 commit 098b55a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/DiffEngineTray/AsyncTimer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async Task RunLoop(Cancel cancel)
4444

4545
public async ValueTask DisposeAsync()
4646
{
47-
tokenSource.Cancel();
47+
await tokenSource.CancelAsync();
4848
tokenSource.Dispose();
4949
try
5050
{

src/DiffEngineTray/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static async Task Inner()
7171
icon.ContextMenuStrip = menuStrip;
7272

7373
Application.Run();
74-
tokenSource.Cancel();
74+
await tokenSource.CancelAsync();
7575
await task;
7676
}
7777

0 commit comments

Comments
 (0)