mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Refactoring multithreading
1. ThreadPool -> Task 2. fix deadlock 3. remove unnecessory application.dispatcher.invoke 4. enable non-main thread access to results collection 5. Misc 6. part of #412
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using NAppUpdate.Framework;
|
||||
using NAppUpdate.Framework.Common;
|
||||
@@ -80,7 +81,7 @@ namespace Wox.Core.Updater
|
||||
|
||||
public void CheckUpdate()
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(o =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
string json = HttpRequest.Get(VersionCheckURL, HttpProxy.Instance);
|
||||
if (!string.IsNullOrEmpty(json))
|
||||
|
||||
Reference in New Issue
Block a user