System.Threading.Timeout.InfiniteTimeSpan Field

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

Syntax

public static readonly TimeSpan InfiniteTimeSpan

Remarks

For threading methods that accept a timeout parameter, such as Thread.Sleep(TimeSpan) and Thread.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 System.Threading.Mutex, System.Threading.Monitor, System.Threading.EventWaitHandle, or System.Threading.Semaphore instead to sychronize threads or manage resources.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0