瀏覽代碼

Fixed thread not dying

Krzysztof Krysiński 1 年之前
父節點
當前提交
e602c5ca7e
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/PixiEditor/Models/Controllers/MouseUpdateControllerSession.cs

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

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