SynchronousQueue.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 head of this queue, if another thread is currently making an element available. |
Poll(Int64, TimeUnit) |
Retrieves and removes the head of this queue, waiting if necessary up to the specified wait time, for another thread to insert it. |
Poll()
Retrieves and removes the head of this queue, if another thread is currently making an element available.
[Android.Runtime.Register("poll", "()Ljava/lang/Object;", "GetPollHandler")]
public override Java.Lang.Object? Poll ();
[<Android.Runtime.Register("poll", "()Ljava/lang/Object;", "GetPollHandler")>]
override this.Poll : unit -> Java.Lang.Object
Returns
the head of this queue, or null
if no
element is available
Implements
- Attributes
Remarks
Retrieves and removes the head of this queue, if another thread is currently making an element available.
Java documentation for java.util.concurrent.SynchronousQueue.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 head of this queue, waiting if necessary up to the specified wait time, for another thread to insert it.
[Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler")]
public virtual Java.Lang.Object? Poll (long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler")>]
override this.Poll : int64 * Java.Util.Concurrent.TimeUnit -> Java.Lang.Object
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 head of this queue, or null
if the
specified waiting time elapses before an element is present
Implements
- Attributes
Exceptions
Remarks
Retrieves and removes the head of this queue, waiting if necessary up to the specified wait time, for another thread to insert it.
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.