Condividi tramite


IBlockingDeque.Poll Method

Definition

Overloads

Poll(Int64, TimeUnit)

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting up to the specified wait time if necessary for an element to become available.

Poll()

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty.

Poll(Int64, TimeUnit)

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting up to the specified wait time if necessary for an element to become available.

[Android.Runtime.Register("poll", "(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;", "GetPoll_JLjava_util_concurrent_TimeUnit_Handler:Java.Util.Concurrent.IBlockingDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public 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:Java.Util.Concurrent.IBlockingDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member 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 deque, or null if the specified waiting time elapses before an element is available

Implements

Attributes

Exceptions

if interrupted while waiting

Remarks

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting up to the specified wait time if necessary for an element to become available.

This method is equivalent to #pollFirst(long,TimeUnit) pollFirst.

Java documentation for java.util.concurrent.BlockingDeque.poll(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

Poll()

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty.

[Android.Runtime.Register("poll", "()Ljava/lang/Object;", "GetPollHandler:Java.Util.Concurrent.IBlockingDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? Poll ();
[<Android.Runtime.Register("poll", "()Ljava/lang/Object;", "GetPollHandler:Java.Util.Concurrent.IBlockingDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Poll : unit -> Java.Lang.Object

Returns

the head of this deque, or null if this deque is empty

Implements

Attributes

Remarks

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty.

This method is equivalent to #pollFirst().

Java documentation for java.util.concurrent.BlockingDeque.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