From acd52a1936090eee11b3220f5c75ee37763773c7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 15 Oct 2015 14:03:53 +0200 Subject: Remove deprectated classes and methods --- src/java/com/jogamp/common/util/RunnableTask.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/java/com/jogamp/common/util/RunnableTask.java') 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 runnable on the current {@link Thread}. + * @param runnable the {@link Runnable} to execute on the current thread. + * The runnable must exit, 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; } /** -- cgit v1.2.3