public abstract class Exec
extends java.lang.Object
invokeAsync(java.lang.Runnable)) and on the
main PlayN game thread (invokeLater(java.lang.Runnable)).| Modifier and Type | Class and Description |
|---|---|
static class |
Exec.Default
A default exec implementation which processes
Exec.Default.invokeLater(java.lang.Runnable) via the frame tick. |
| Constructor and Description |
|---|
Exec() |
| Modifier and Type | Method and Description |
|---|---|
<T> RPromise<T> |
deferredPromise()
Creates a promise which defers notification of success or failure to the game thread,
regardless of what thread on which it is completed.
|
void |
invokeAsync(java.lang.Runnable action)
Invokes the supplied action on a separate thread.
|
abstract void |
invokeLater(java.lang.Runnable action)
Invokes
action on the next Platform.frame signal. |
boolean |
isAsyncSupported()
Returns whether this platform supports async (background) operations.
|
abstract boolean |
isMainThread()
Returns true if the caller is running on the 'main' game thread, false otherwise.
|
public abstract boolean isMainThread()
public abstract void invokeLater(java.lang.Runnable action)
action on the next Platform.frame signal. The default implementation
listens to the frame signal at a very high priority so that invoke later actions will run
before the game's normal callbacks.public <T> RPromise<T> deferredPromise()
public boolean isAsyncSupported()
public void invokeAsync(java.lang.Runnable action)
java.lang.UnsupportedOperationException - if the platform does not support async operations.Copyright © 2018. All Rights Reserved.