summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util/RunnableTask.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-10-15 14:03:53 +0200
committerSven Gothel <[email protected]>2015-10-15 14:03:53 +0200
commitacd52a1936090eee11b3220f5c75ee37763773c7 (patch)
tree239c23ecc917650bd59d9aaddb1b76b9a9d01197 /src/java/com/jogamp/common/util/RunnableTask.java
parentf829ccd1696e3b4016f11319f7b6148a8a0a2c78 (diff)
Remove deprectated classes and methods
Diffstat (limited to 'src/java/com/jogamp/common/util/RunnableTask.java')
-rw-r--r--src/java/com/jogamp/common/util/RunnableTask.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/java/com/jogamp/common/util/RunnableTask.java b/src/java/com/jogamp/common/util/RunnableTask.java
index 57809b9..2689de1 100644
--- a/src/java/com/jogamp/common/util/RunnableTask.java
+++ b/src/java/com/jogamp/common/util/RunnableTask.java
@@ -40,18 +40,16 @@ public class RunnableTask extends TaskBase {
protected final Runnable runnable;
/**
- * @deprecated Simply invoke {@link Runnable#run()}
- */
- public static void invoke(final boolean waitUntilDone, final Runnable runnable) {
- runnable.run();
- }
-
- /**
- * @deprecated Use {@link #invokeOnNewThread(ThreadGroup, String, boolean, Runnable)}
+ * Invokes <code>runnable</code> on the current {@link Thread}.
+ * @param runnable the {@link Runnable} to execute on the current thread.
+ * The runnable <b>must exit</b>, i.e. not loop forever.
+ * @return the newly created and invoked {@link RunnableTask}
+ * @since 2.4.0
*/
- public static Thread invokeOnNewThread(final ThreadGroup tg, final boolean waitUntilDone, final Runnable runnable, final String threadName) {
- final RunnableTask rt = invokeOnNewThread(tg, threadName, waitUntilDone, runnable);
- return rt.getExecutionThread();
+ public static RunnableTask invokeOnCurrentThread(final Runnable runnable) {
+ final RunnableTask rt = new RunnableTask( runnable, null, false, null );
+ rt.run();
+ return rt;
}
/**