Language

IBlockingQueueExtensions.OfferAsync Method

Definition

Overloads

Name Description
OfferAsync(IBlockingQueue, Object)

Runs Offer(Object) on the specified queue through Task.

OfferAsync(IBlockingQueue, Object, Int64, TimeUnit)

Runs Offer(Object, Int64, TimeUnit) on the specified queue through Task.

OfferAsync(IBlockingQueue, Object)

Runs Offer(Object) on the specified queue through Task.

public static System.Threading.Tasks.Task<bool> OfferAsync(this Java.Util.Concurrent.IBlockingQueue self, Java.Lang.Object? e);
static member OfferAsync : Java.Util.Concurrent.IBlockingQueue * Java.Lang.Object -> System.Threading.Tasks.Task<bool>

Parameters

self
IBlockingQueue

The queue whose Offer(Object) method is called.

e
Object

The element passed to Offer(Object) for insertion.

Returns

A task whose result indicates whether Offer(Object) inserted the element.

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

OfferAsync(IBlockingQueue, Object, Int64, TimeUnit)

Runs Offer(Object, Int64, TimeUnit) on the specified queue through Task.

public static System.Threading.Tasks.Task<bool> OfferAsync(this Java.Util.Concurrent.IBlockingQueue self, Java.Lang.Object? e, long timeout, Java.Util.Concurrent.TimeUnit? unit);
static member OfferAsync : Java.Util.Concurrent.IBlockingQueue * Java.Lang.Object * int64 * Java.Util.Concurrent.TimeUnit -> System.Threading.Tasks.Task<bool>

Parameters

self
IBlockingQueue

The queue whose timed Offer(Object, Int64, TimeUnit) method is called.

e
Object

The element passed to Offer(Object, Int64, TimeUnit) for insertion.

timeout
Int64

The maximum wait duration passed to Offer(Object, Int64, TimeUnit).

unit
TimeUnit

The unit used to measure timeout.

Returns

A task whose result indicates whether the timed Offer(Object, Int64, TimeUnit) call inserted the element.

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