.NET Client Documentation
5.1.1
Search Results for

    Show / Hide Table of Contents

    OfferAsync Method

    OfferAsync(T, TimeSpan)

    Tries to enqueue an item.

    Declaration
    Task<bool> OfferAsync(T item, TimeSpan timeToWait = default(TimeSpan))
    Parameters
    T item

    The item to enqueue.

    TimeSpan timeToWait

    How long to wait for space (-1ms to wait forever; 0ms to not wait at all).

    Returns
    Task<Boolean>

    true if the element was added to this queue; otherwise false.

    Remarks

    If space is not immediately available, this will wait for the specified timeToWait for space to become available. If space does not become available in time, returns false. If timeToWait is -1ms, waits forever. If it is 0ms, does not wait at all.

    In This Article
    Back to top Copyright © 2010-2022 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.