IExecutorServiceExtensions.InvokeAnyAsync 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
| Name | Description |
|---|---|
| InvokeAnyAsync(IExecutorService, ICollection) |
Runs InvokeAny(ICollection) on the specified executor through Task. |
| InvokeAnyAsync(IExecutorService, ICollection, Int64, TimeUnit) |
Runs InvokeAny(ICollection, Int64, TimeUnit) on the specified executor through Task. |
InvokeAnyAsync(IExecutorService, ICollection)
Runs InvokeAny(ICollection) on the specified executor through Task.
public static System.Threading.Tasks.Task<Java.Lang.Object?> InvokeAnyAsync(this Java.Util.Concurrent.IExecutorService self, System.Collections.ICollection? tasks);
static member InvokeAnyAsync : Java.Util.Concurrent.IExecutorService * System.Collections.ICollection -> System.Threading.Tasks.Task<Java.Lang.Object>
Parameters
- self
- IExecutorService
The executor whose InvokeAny(ICollection) method is called.
- tasks
- ICollection
The callable tasks passed to InvokeAny(ICollection).
Returns
A task whose result is the value returned by InvokeAny(ICollection) from a successful callable.
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
InvokeAnyAsync(IExecutorService, ICollection, Int64, TimeUnit)
Runs InvokeAny(ICollection, Int64, TimeUnit) on the specified executor through Task.
public static System.Threading.Tasks.Task<Java.Lang.Object?> InvokeAnyAsync(this Java.Util.Concurrent.IExecutorService self, System.Collections.ICollection? tasks, long timeout, Java.Util.Concurrent.TimeUnit? unit);
static member InvokeAnyAsync : Java.Util.Concurrent.IExecutorService * System.Collections.ICollection * int64 * Java.Util.Concurrent.TimeUnit -> System.Threading.Tasks.Task<Java.Lang.Object>
Parameters
- self
- IExecutorService
The executor whose timed InvokeAny(ICollection, Int64, TimeUnit) method is called.
- tasks
- ICollection
The callable tasks passed to InvokeAny(ICollection, Int64, TimeUnit).
- timeout
- Int64
The maximum wait duration passed to InvokeAny(ICollection, Int64, TimeUnit).
- unit
- TimeUnit
The unit used to measure timeout.
Returns
A task whose result is the value returned by the timed InvokeAny(ICollection, Int64, TimeUnit) call from a successful callable.
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.