Udostępnij za pośrednictwem


IExecutorService.InvokeAll Method

Definition

Overloads

InvokeAll(ICollection)

Executes the given tasks, returning a list of Futures holding their status and results when all complete.

InvokeAll(ICollection, Int64, TimeUnit)

Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.

InvokeAll(ICollection)

Executes the given tasks, returning a list of Futures holding their status and results when all complete.

[Android.Runtime.Register("invokeAll", "(Ljava/util/Collection;)Ljava/util/List;", "GetInvokeAll_Ljava_util_Collection_Handler:Java.Util.Concurrent.IExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public System.Collections.IList? InvokeAll (System.Collections.ICollection? tasks);
[<Android.Runtime.Register("invokeAll", "(Ljava/util/Collection;)Ljava/util/List;", "GetInvokeAll_Ljava_util_Collection_Handler:Java.Util.Concurrent.IExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member InvokeAll : System.Collections.ICollection -> System.Collections.IList

Parameters

tasks
ICollection

the collection of tasks

Returns

a list of Futures representing the tasks, in the same sequential order as produced by the iterator for the given task list, each of which has completed

Attributes

Remarks

Executes the given tasks, returning a list of Futures holding their status and results when all complete. Future#isDone is true for each element of the returned list. Note that a <em>completed</em> task could have terminated either normally or by throwing an exception. The results of this method are undefined if the given collection is modified while this operation is in progress.

Java documentation for java.util.concurrent.ExecutorService.invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>).

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

InvokeAll(ICollection, Int64, TimeUnit)

Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.

[Android.Runtime.Register("invokeAll", "(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/util/List;", "GetInvokeAll_Ljava_util_Collection_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public System.Collections.IList? InvokeAll (System.Collections.ICollection? tasks, long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("invokeAll", "(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/util/List;", "GetInvokeAll_Ljava_util_Collection_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IExecutorServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member InvokeAll : System.Collections.ICollection * int64 * Java.Util.Concurrent.TimeUnit -> System.Collections.IList

Parameters

tasks
ICollection

the collection of tasks

timeout
Int64

the maximum time to wait

unit
TimeUnit

the time unit of the timeout argument

Returns

a list of Futures representing the tasks, in the same sequential order as produced by the iterator for the given task list. If the operation did not time out, each task will have completed. If it did time out, some of these tasks will not have completed.

Attributes

Remarks

Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first. Future#isDone is true for each element of the returned list. Upon return, tasks that have not completed are cancelled. Note that a <em>completed</em> task could have terminated either normally or by throwing an exception. The results of this method are undefined if the given collection is modified while this operation is in progress.

Java documentation for java.util.concurrent.ExecutorService.invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit).

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