.NET Client Documentation
5.1.1
Search Results for

    Show / Hide Table of Contents

    PollAsync Method

    PollAsync(TimeSpan)

    Tries to dequeue an item.

    Declaration
    Task<T> PollAsync(TimeSpan timeToWait = default(TimeSpan))
    Parameters
    TimeSpan timeToWait

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

    Returns
    Task<T>

    The item, or null if not item could be dequeued within the specified timeToWait.

    Remarks

    If an item is not immediately available, this will wait for the specified timeToWait for an item to become available. If an item does not become available in time, returns null. 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.