Threading Threading
Threading Threading
DocFX + Singulink = ♥

Search Results for

    Method TryWait

    TryWait(CancellationToken)

    Waits before another attempt if the time limit has not passed.

    Declaration
    public bool TryWait(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A token that cancels the wait.

    Returns
    Type Description
    bool

    true after the wait if another attempt can be made; false without waiting if the time limit has passed.

    Remarks

    The wait is the delay, or the time left until the time limit passes if that is shorter, rounded up to whole milliseconds. The calling thread is blocked during the wait.

    Exceptions
    Type Condition
    OperationCanceledException

    cancellationToken was canceled before or during the wait.

    © Singulink. All rights reserved.