Timeout Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

System.Object
  System.Threading.Timeout

[<AbstractClass>]
[<Sealed>]
[<ComVisibleAttribute(true)>]
type Timeout = class end

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticInfinite

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

System_CAPS_pubfieldSystem_CAPS_staticInfiniteTimeSpan

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

The members of this class are used to specify infinite time-out intervals in threading operations. Infinite is used by methods that accept an integer millisecondsTimeout parameter, such as Thread.Sleep(Int32), Thread.Join(Int32), and ReaderWriterLock.AcquireReaderLock(Int32). InfiniteTimeSpan is used by methods that accept a timeout parameter of type TimeSpan, such as Thread.Sleep(TimeSpan), Thread.Join(TimeSpan), and ReaderWriterLock.AcquireReaderLock(TimeSpan).

The following example shows a thread going to sleep for an infinite time and subsequently being woken up.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1

This type is thread safe.

Return to top
Show: