Table of Contents

Class Timeout

Namespace
System.Threading
Assembly
mscorlib.dll

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

public static class Timeout
Inheritance
Timeout
Inherited Members

Fields

Infinite

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

public const int Infinite = -1

Field Value

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.

public static readonly TimeSpan InfiniteTimeSpan

Field Value

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.