From 4c987ef1cc8eed7da340fb7f6819bba0283f00a8 Mon Sep 17 00:00:00 2001 From: player-03 Date: Mon, 21 Oct 2024 19:51:14 -0400 Subject: [PATCH] HL didn't support threads in Haxe 3. --- src/lime/system/BackgroundWorker.hx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lime/system/BackgroundWorker.hx b/src/lime/system/BackgroundWorker.hx index cc4ce91a97..30d69d1ed8 100644 --- a/src/lime/system/BackgroundWorker.hx +++ b/src/lime/system/BackgroundWorker.hx @@ -69,7 +69,7 @@ class BackgroundWorker public var onProgress = new EventVoid>(); @:noCompletion private var __runMessage:Dynamic; - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) @:noCompletion private var __messageQueue:Deque; @:noCompletion private var __workerThread:Thread; #end @@ -87,7 +87,7 @@ class BackgroundWorker { canceled = true; - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) __workerThread = null; #end } @@ -102,7 +102,7 @@ class BackgroundWorker completed = false; __runMessage = message; - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) __messageQueue = new Deque(); __workerThread = Thread.create(__doWork); @@ -125,7 +125,7 @@ class BackgroundWorker { completed = true; - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) __messageQueue.add(MESSAGE_COMPLETE); __messageQueue.add(message); #else @@ -143,7 +143,7 @@ class BackgroundWorker **/ public function sendError(message:Dynamic = null):Void { - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) __messageQueue.add(MESSAGE_ERROR); __messageQueue.add(message); #else @@ -161,7 +161,7 @@ class BackgroundWorker **/ public function sendProgress(message:Dynamic = null):Void { - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) __messageQueue.add(message); #else if (!canceled) @@ -193,7 +193,7 @@ class BackgroundWorker @:noCompletion private function __update(deltaTime:Int):Void { - #if (cpp || neko || hl) + #if (cpp || neko || (haxe4 && hl)) var message = __messageQueue.pop(false); if (message != null)