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/FunctionTask.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/java/com/jogamp/common/util/FunctionTask.java') diff --git a/src/java/com/jogamp/common/util/FunctionTask.java b/src/java/com/jogamp/common/util/FunctionTask.java index 630ae2f..9eb1ca5 100644 --- a/src/java/com/jogamp/common/util/FunctionTask.java +++ b/src/java/com/jogamp/common/util/FunctionTask.java @@ -42,10 +42,21 @@ public class FunctionTask extends TaskBase implements Function { protected A[] args; /** - * @deprecated Simply invoke {@link Function#eval(Object...)} + * Invokes func on the current {@link Thread}. + *

+ * The result can be retrieved via {@link FunctionTask#getResult()}, + * using the returned instance. + *

+ * @param func the {@link Function} to execute. + * @param args the {@link Function} arguments + * @return the newly created and invoked {@link FunctionTask} + * @since 2.4.0 */ - public static U invoke(final boolean waitUntilDone, final Function func, final V... args) { - return func.eval(args); + public static FunctionTask invokeOnCurrentThread(final Function func, final V... args) { + final FunctionTask rt = new FunctionTask( func, null, false, null); + rt.args = args; + rt.run(); + return rt; } /** -- cgit v1.2.3