From 5c8538efcb52d44fd6fc00803847ef70b9c9ab92 Mon Sep 17 00:00:00 2001 From: Chris Speciale Date: Thu, 22 Aug 2024 17:22:39 -0400 Subject: [PATCH] BackgroundWorker: More docs Forgot the properties. --- src/lime/system/BackgroundWorker.hx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/lime/system/BackgroundWorker.hx b/src/lime/system/BackgroundWorker.hx index 97bec2bae..f92ca0ca1 100644 --- a/src/lime/system/BackgroundWorker.hx +++ b/src/lime/system/BackgroundWorker.hx @@ -37,11 +37,35 @@ class BackgroundWorker private static var MESSAGE_COMPLETE = "__COMPLETE__"; private static var MESSAGE_ERROR = "__ERROR__"; + /** + Indicates whether the worker has been canceled. + **/ public var canceled(default, null):Bool; + + /** + Indicates whether the worker has completed its task. + **/ public var completed(default, null):Bool; + + /** + Dispatched when the worker is about to perform its task. + The function to execute should be added as a listener to this event. + **/ public var doWork = new EventVoid>(); + + /** + Dispatched when the worker has successfully completed its task. + **/ public var onComplete = new EventVoid>(); + + /** + Dispatched if an error occurs during the execution of the worker's task. + **/ public var onError = new EventVoid>(); + + /** + Dispatched periodically during the worker's task to provide progress updates. + **/ public var onProgress = new EventVoid>(); @:noCompletion private var __runMessage:Dynamic;