ICompletionService.Submit Method
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
Submit(ICallable) |
Submits a value-returning task for execution and returns a Future representing the pending results of the task. |
Submit(IRunnable, Object) |
Submits a Runnable task for execution and returns a Future representing that task. |
Submit(ICallable)
Submits a value-returning task for execution and returns a Future representing the pending results of the task.
[Android.Runtime.Register("submit", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;", "GetSubmit_Ljava_util_concurrent_Callable_Handler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.Concurrent.IFuture? Submit (Java.Util.Concurrent.ICallable? task);
[<Android.Runtime.Register("submit", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;", "GetSubmit_Ljava_util_concurrent_Callable_Handler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Submit : Java.Util.Concurrent.ICallable -> Java.Util.Concurrent.IFuture
Parameters
- task
- ICallable
the task to submit
Returns
a Future representing pending completion of the task
- Attributes
Remarks
Submits a value-returning task for execution and returns a Future representing the pending results of the task. Upon completion, this task may be taken or polled.
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
Submit(IRunnable, Object)
Submits a Runnable task for execution and returns a Future representing that task.
[Android.Runtime.Register("submit", "(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Future;", "GetSubmit_Ljava_lang_Runnable_Ljava_lang_Object_Handler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.Concurrent.IFuture? Submit (Java.Lang.IRunnable? task, Java.Lang.Object? result);
[<Android.Runtime.Register("submit", "(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Future;", "GetSubmit_Ljava_lang_Runnable_Ljava_lang_Object_Handler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Submit : Java.Lang.IRunnable * Java.Lang.Object -> Java.Util.Concurrent.IFuture
Parameters
- task
- IRunnable
the task to submit
- result
- Object
the result to return upon successful completion
Returns
a Future representing pending completion of the task,
and whose get()
method will return the given
result value upon completion
- Attributes
Remarks
Submits a Runnable task for execution and returns a Future representing that task. Upon completion, this task may be taken or polled.
Java documentation for java.util.concurrent.CompletionService.submit(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.