瀏覽代碼

[eval] Fix MainLoop.add not repeating (#11202)

Rudy Ges 2 年之前
父節點
當前提交
5a51513355
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      std/eval/_std/sys/thread/EventLoop.hx

+ 2 - 5
std/eval/_std/sys/thread/EventLoop.hx

@@ -196,11 +196,8 @@ class EventLoop {
 
 		if (started && isMainThread) {
 			var next = @:privateAccess MainLoop.tick();
-			if (haxe.MainLoop.hasEvents()) {
-				wakeup.send();
-			} else {
-				refUnref();
-			}
+			if (haxe.MainLoop.hasEvents()) wakeup.send();
+			refUnref();
 		}
 	}
 }