Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AsyncTask

[15:7] extends: FxObj

Wraps FXGL's AsyncTask, the handle returned by Executor.startAsync and startAsyncFX. The only operation is await, which blocks the calling thread until the task completes and returns its result. Aussom users typically receive an AsyncTask from fxgl.getExecutor().startAsync (or startAsyncFX) -- both AJI-only in chunk 3, so this wrapper exists primarily so users that do reach the raw Java API have a typed handle for await().

Methods

  • AsyncTask (Ajo = null)

    Wraps an existing AsyncTask AussomJavaObject in an AsyncTask wrapper.

    • @p Ajo is an AussomJavaObject around an FXGL AsyncTask.
  • await ()

    Blocks the calling thread until the task completes and returns its result.

    • @r The task result.