From 569dedcf65731dafaa5c32724e3b26ec7674db96 Mon Sep 17 00:00:00 2001 From: Tichau Date: Wed, 7 Sep 2016 08:07:40 +0200 Subject: [PATCH] Fix multi threading issue Fix an issue where multiple conversion jobs was created for the same file in some cases. --- Application/FileConverter/Application.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Application/FileConverter/Application.xaml.cs b/Application/FileConverter/Application.xaml.cs index 9b621d2..02eee85 100644 --- a/Application/FileConverter/Application.xaml.cs +++ b/Application/FileConverter/Application.xaml.cs @@ -410,6 +410,12 @@ namespace FileConverter if (jobThread != null) { jobThread.Start(conversionJob); + + while (conversionJob.State == ConversionJob.ConversionState.Ready) + { + Debug.Log("Wait the launch of the conversion thread before launching any other thread."); + Thread.Sleep(20); + } } break;