mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +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:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
using Exceptionless;
|
||||
@@ -40,7 +41,7 @@ namespace Wox.CrashReporter
|
||||
private void SendReport()
|
||||
{
|
||||
Hide();
|
||||
ThreadPool.QueueUserWorkItem(o =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
string reproduceSteps = new TextRange(tbReproduceSteps.Document.ContentStart, tbReproduceSteps.Document.ContentEnd).Text;
|
||||
exception.ToExceptionless()
|
||||
|
||||
Reference in New Issue
Block a user