Share via


FutureTask Constructors

Definition

Overloads

FutureTask(ICallable)

Creates a FutureTask that will, upon running, execute the given Callable.

FutureTask(IRunnable, Object)

Creates a FutureTask that will, upon running, execute the given Runnable, and arrange that get will return the given result on successful completion.

FutureTask(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

FutureTask(ICallable)

Creates a FutureTask that will, upon running, execute the given Callable.

[Android.Runtime.Register(".ctor", "(Ljava/util/concurrent/Callable;)V", "")]
public FutureTask (Java.Util.Concurrent.ICallable? callable);
[<Android.Runtime.Register(".ctor", "(Ljava/util/concurrent/Callable;)V", "")>]
new Java.Util.Concurrent.FutureTask : Java.Util.Concurrent.ICallable -> Java.Util.Concurrent.FutureTask

Parameters

callable
ICallable

the callable task

Attributes

Remarks

Creates a FutureTask that will, upon running, execute the given Callable.

Java documentation for java.util.concurrent.FutureTask.FutureTask(java.util.concurrent.Callable<V>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

FutureTask(IRunnable, Object)

Creates a FutureTask that will, upon running, execute the given Runnable, and arrange that get will return the given result on successful completion.

[Android.Runtime.Register(".ctor", "(Ljava/lang/Runnable;Ljava/lang/Object;)V", "")]
public FutureTask (Java.Lang.IRunnable? runnable, Java.Lang.Object? result);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Runnable;Ljava/lang/Object;)V", "")>]
new Java.Util.Concurrent.FutureTask : Java.Lang.IRunnable * Java.Lang.Object -> Java.Util.Concurrent.FutureTask

Parameters

runnable
IRunnable

the runnable task

result
Object

the result to return on successful completion. If you don't need a particular result, consider using constructions of the form: Future<?> f = new FutureTask<Void>(runnable, null)

Attributes

Remarks

Creates a FutureTask that will, upon running, execute the given Runnable, and arrange that get will return the given result on successful completion.

Java documentation for java.util.concurrent.FutureTask.FutureTask(java.lang.Runnable, V).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

FutureTask(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected FutureTask (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.Concurrent.FutureTask : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.Concurrent.FutureTask

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to