System.Threading.Timeout.Infinite Field

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

Value: -1

Syntax

public const int Infinite

Remarks

For threading methods that accept a millisecondsTimeout parameter, such as Thread.Sleep(int) and Thread.Join(int), 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: 1.0.5000.0, 2.0.0.0, 4.0.0.0