Package net.storm.sdk.game
Class GameThread
- java.lang.Object
-
- net.storm.sdk.game.GameThread
-
public class GameThread extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GameThread()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
invoke(java.lang.Runnable runnable)
Invokes a runnable on the client thread.static void
invokeAndWait(java.lang.Runnable runnable)
Schedules an execution on the client thread and waits until execution.static <T> T
invokeAndWait(java.util.concurrent.Callable<T> callable)
Schedules an execution on the client thread and waits for the result.
-
-
-
Method Detail
-
invoke
public static void invoke(java.lang.Runnable runnable)
Invokes a runnable on the client thread.- Parameters:
runnable
- the runnable to invoke
-
invokeAndWait
public static <T> T invokeAndWait(java.util.concurrent.Callable<T> callable)
Schedules an execution on the client thread and waits for the result.- Type Parameters:
T
- the type of the result- Parameters:
callable
- the callable to invoke- Returns:
- the result of the callable
-
invokeAndWait
public static void invokeAndWait(java.lang.Runnable runnable)
Schedules an execution on the client thread and waits until execution.- Parameters:
runnable
- the runnable to invoke
-
-