Search Results for

    Show / Hide Table of Contents

    Class Timeout

    Contains constants that specify infinite time-out intervals. This class cannot be inherited.

    Inheritance
    object
    Timeout
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: System.Threading
    Assembly: mscorlib.dll
    Syntax
    public static class Timeout

    Fields

    Infinite

    A constant used to specify an infinite waiting period, for threading methods that accept an Int32 parameter.

    Declaration
    public const int Infinite = -1
    Field Value
    Type Description
    int
    Remarks

    The value of this field is -1 (0xFFFFFFFF).

    InfiniteTimeSpan

    A constant used to specify an infinite waiting period, for methods that accept a TimeSpan parameter.

    Declaration
    public static readonly TimeSpan InfiniteTimeSpan
    Field Value
    Type Description
    TimeSpan
    Remarks

    For threading methods that accept a timeout parameter of type TimeSpan, such as Sleep(TimeSpan) and Join(TimeSpan), this value is used to suspend the thread indefinitely. However, in most cases, we recommend that you use other System.Threading classes such as AutoResetEvent, ManualResetEvent, Monitor or WaitHandle instead to synchronize threads or manage resources. The value of this field is -00:00:00.0010000, or -1 millisecond.

    In This Article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX