ICompletionService.Poll 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
Poll() |
Retrieves and removes the Future representing the next
completed task, or |
Poll(Int64, TimeUnit) |
Retrieves and removes the Future representing the next completed task, waiting if necessary up to the specified wait time if none are yet present. |
Poll()
Retrieves and removes the Future representing the next
completed task, or null
if none are present.
[Android.Runtime.Register("poll", "()Ljava/util/concurrent/Future;", "GetPollHandler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.Concurrent.IFuture? Poll ();
[<Android.Runtime.Register("poll", "()Ljava/util/concurrent/Future;", "GetPollHandler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Poll : unit -> Java.Util.Concurrent.IFuture
Returns
the Future representing the next completed task, or
null
if none are present
- Attributes
Remarks
Retrieves and removes the Future representing the next completed task, or null
if none are present.
Java documentation for java.util.concurrent.CompletionService.poll()
.
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
Poll(Int64, TimeUnit)
Retrieves and removes the Future representing the next completed task, waiting if necessary up to the specified wait time if none are yet present.
[Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/Future;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.Concurrent.IFuture? Poll (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/Future;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.ICompletionServiceInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Poll : int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IFuture
Parameters
- timeout
- Int64
how long to wait before giving up, in units of
unit
- unit
- TimeUnit
a TimeUnit
determining how to interpret the
timeout
parameter
Returns
the Future representing the next completed task or
null
if the specified waiting time elapses
before one is present
- Attributes
Exceptions
if interrupted while waiting
Remarks
Retrieves and removes the Future representing the next completed task, waiting if necessary up to the specified wait time if none are yet present.
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.