Basics
Guides
API Reference
Basics
Guides
API Reference
[25:7] extends: FxObj
Wraps FXGL's Executor interface (com.almasb.fxgl.core.concurrent.Executor) obtained via fxgl.getExecutor(). Provides the canonical async surface: startAsync runs work on a background thread, startAsyncFX runs work on the JavaFX Application Thread, and schedule queues a Runnable for delayed execution. Each startAsync / startAsyncFX call returns an AsyncTask wrapper whose await() blocks until the work finishes (returning the Callable result or null for a Runnable). Distinct from the existing Async.aus static helper: that hits the singleton directly for one-off background work; this is the full Executor wrapper for cases where the caller already has the instance (typically via fxgl.getExecutor()).
Executor ()
Empty default constructor; populated by adopt.
adopt (object Ajo)
Wraps an existing Executor AussomJavaObject.
Ajo is an AussomJavaObject around an FXGL Executor.A new Executor wrapper.schedule (callback Cb, double DelayMs)
Schedules a Runnable for execution after the given delay (in milliseconds). Returns the underlying ScheduledFuture AJO so the caller can cancel or query its status.
Cb is the runnable to invoke after the delay.DelayMs is the delay in milliseconds before running.An AussomJavaObject around a ScheduledFuture.startAsync (callback Cb)
Submits a Runnable on a background thread. Returns an AsyncTask whose await() returns null when the work completes.
Cb is the runnable to invoke.An AsyncTask wrapper.startAsyncCallable (callback Cb)
Submits a Callable on a background thread. Returns an AsyncTask whose await() yields the callable's result.
Cb is a callback returning the result value.An AsyncTask wrapper.startAsyncFX (callback Cb)
Submits a Runnable on the JavaFX Application Thread. Returns an AsyncTask whose await() returns null when the work completes. Use this when the body needs to mutate the scene graph or any JavaFX-thread-only state.
Cb is the runnable to invoke on the FX thread.An AsyncTask wrapper.startAsyncCallableFX (callback Cb)
Submits a Callable on the JavaFX Application Thread. Returns an AsyncTask whose await() yields the callable's result. Use this when the body must run on the FX thread and produce a value the caller needs to observe.
Cb is a callback returning the result value.An AsyncTask wrapper.execute (callback Cb)
Submits a Runnable for execution. Inherited from java.util.concurrent.Executor — no result handle is returned; use startAsync if the caller needs to await completion.
Cb is the runnable to invoke.this objectshutdownNow ()
Initiates an immediate shutdown of the executor. Any outstanding work is cancelled; no new submissions are accepted.
this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.