mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
revert unintended remove of await TaskScheduler.Default back
This commit is contained in:
parent
89bb169fee
commit
11ca5f9bf3
1 changed files with 4 additions and 1 deletions
|
|
@ -482,6 +482,9 @@ namespace Flow.Launcher.ViewModel
|
|||
ProgressBarVisibility = Visibility.Hidden;
|
||||
_isQueryRunning = true;
|
||||
|
||||
// Switch to ThreadPool thread
|
||||
await TaskScheduler.Default;
|
||||
|
||||
var query = QueryBuilder.Build(QueryText.Trim(), PluginManager.NonGlobalPlugins);
|
||||
|
||||
// handle the exclusiveness of plugin using action keyword
|
||||
|
|
@ -543,7 +546,7 @@ namespace Flow.Launcher.ViewModel
|
|||
// Local function
|
||||
async Task QueryTask(PluginPair plugin)
|
||||
{
|
||||
// Since it is wrapped within a Task.Run, the synchronous context is null
|
||||
// Since it is wrapped within a ThreadPool Thread, the synchronous context is null
|
||||
// Task.Yield will force it to run in ThreadPool
|
||||
await Task.Yield();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue