Selaa lähdekoodia

Fixed thread not dying

Krzysztof Krysiński 1 vuosi sitten
vanhempi
commit
e602c5ca7e

+ 5 - 2
src/PixiEditor/Models/Controllers/MouseUpdateControllerSession.cs

@@ -31,8 +31,11 @@ internal class MouseUpdateControllerSession : IDisposable
         this.onStopListening = onStopListening;
         this.onStopListening = onStopListening;
         this.onMouseMove = onMouseMove;
         this.onMouseMove = onMouseMove;
 
 
-        Thread timerThread = new(TimerLoop);
-        timerThread.Name = "MouseUpdateController thread";
+        Thread timerThread = new(TimerLoop)
+        {
+            IsBackground = true, Name = "MouseUpdateController thread"
+        };
+
         timerThread.Start();
         timerThread.Start();
 
 
         onStartListening();
         onStartListening();