Package-level declarations
Types
Base extension of CoroutineDispatcher for dispatchers using the libGDX threading model. Uses libGDX Timer API to support delay.
A CoroutineDispatcher that wraps around libGDX AsyncExecutor instance (available via executor property) to execute tasks asynchronously. threads property is purely informational and cannot be verified, since AsyncExecutor does not expose the amount of threads it uses internally; provide a valid threads amount during initiation or use the official factory methods to prevent from mismatches with the actual max threads amount.
Wraps around libGDX Timer.Task to make it possible to cancel scheduled tasks. Holds a reference to the original scheduled task.
Main KTX coroutine scope. Executes tasks on the main rendering thread. See MainDispatcher.
Base interface of CoroutineContext for dispatchers using the libGDX threading model. Uses libGDX Timer API to support delay.
Executes tasks on the main rendering thread. See RenderingThreadDispatcher.
A CoroutineDispatcher that wraps around libGDX runnable execution API to execute tasks on the main rendering thread. Uses libGDX Timer API to support delay.
Implements MainDispatcherFactory to provide references to the MainDispatcher.
Properties
Main KTX coroutine dispatcher. Executes tasks on the main rendering thread. See MainDispatcher.
Functions
Executes a HTTP request asynchronously.
Returns true if the coroutine was launched from a rendering thread dispatcher.
Creates a new AsyncExecutorDispatcher wrapping around an AsyncExecutor with the chosen amount of threads to execute tasks asynchronously outside of the main rendering thread.
Creates a new AsyncExecutorDispatcher wrapping around an AsyncExecutor with a single thread to execute tasks asynchronously outside of the main rendering thread.
Suspends the coroutine to execute the defined block on the main rendering thread and return its result.
Creates a coroutine scope in the rendering thread with a supervisor job. Allows to manage multiple tasks executed on the main rendering thread within a single scope, providing mass actions such as task cancelling that do not affect other scopes.
Converts this non thread-safe HttpResponse to HttpRequestResult that reads and caches the HTTP result content as byte array. Note that this method blocks the current thread until the HTTP result content is read.