Skip to content

Commit 9d9b532

Browse files
committed
check cancellation to avoid racing issue.
1 parent 11ca5f9 commit 9d9b532

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ private async void QueryResults()
485485
// Switch to ThreadPool thread
486486
await TaskScheduler.Default;
487487

488+
if (currentCancellationToken.IsCancellationRequested)
489+
return;
490+
488491
var query = QueryBuilder.Build(QueryText.Trim(), PluginManager.NonGlobalPlugins);
489492

490493
// handle the exclusiveness of plugin using action keyword

0 commit comments

Comments
 (0)