FutureTask Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FutureTask(ICallable) |
Creates a |
FutureTask(IRunnable, Object) |
Creates a |
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
- 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.