Skip to content

Commit 11ca5f9

Browse files
committed
revert unintended remove of await TaskScheduler.Default back
1 parent 89bb169 commit 11ca5f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,9 @@ private async void QueryResults()
482482
ProgressBarVisibility = Visibility.Hidden;
483483
_isQueryRunning = true;
484484

485+
// Switch to ThreadPool thread
486+
await TaskScheduler.Default;
487+
485488
var query = QueryBuilder.Build(QueryText.Trim(), PluginManager.NonGlobalPlugins);
486489

487490
// handle the exclusiveness of plugin using action keyword
@@ -543,7 +546,7 @@ private async void QueryResults()
543546
// Local function
544547
async Task QueryTask(PluginPair plugin)
545548
{
546-
// Since it is wrapped within a Task.Run, the synchronous context is null
549+
// Since it is wrapped within a ThreadPool Thread, the synchronous context is null
547550
// Task.Yield will force it to run in ThreadPool
548551
await Task.Yield();
549552

0 commit comments

Comments
 (0)