mscorlib(4.0.0.0) API with additions
|
Encapsulates operating system–specific objects that wait for exclusive access to shared resources. More...
Public Member Functions | |
virtual bool | WaitOne (int millisecondsTimeout, bool exitContext) |
Blocks the current thread until the current T:System.Threading.WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval and specifying whether to exit the synchronization domain before the wait. More... | |
virtual bool | WaitOne (TimeSpan timeout, bool exitContext) |
Blocks the current thread until the current instance receives a signal, using a T:System.TimeSpan to specify the time interval and specifying whether to exit the synchronization domain before the wait. More... | |
virtual bool | WaitOne () |
Blocks the current thread until the current T:System.Threading.WaitHandle receives a signal. More... | |
virtual bool | WaitOne (int millisecondsTimeout) |
Blocks the current thread until the current T:System.Threading.WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval in milliseconds. More... | |
virtual bool | WaitOne (TimeSpan timeout) |
Blocks the current thread until the current instance receives a signal, using a T:System.TimeSpan to specify the time interval. More... | |
virtual void | Close () |
Releases all resources held by the current T:System.Threading.WaitHandle. More... | |
void | Dispose () |
Releases all resources used by the current instance of the T:System.Threading.WaitHandle class. More... | |
![]() | |
object | GetLifetimeService () |
Retrieves the current lifetime service object that controls the lifetime policy for this instance. More... | |
virtual object | InitializeLifetimeService () |
Obtains a lifetime service object to control the lifetime policy for this instance. More... | |
virtual ObjRef | CreateObjRef (Type requestedType) |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. More... | |
Static Public Member Functions | |
static bool | WaitAll (WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) |
Waits for all the elements in the specified array to receive a signal, using an T:System.Int32 value to specify the time interval and specifying whether to exit the synchronization domain before the wait. More... | |
static bool | WaitAll (WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) |
Waits for all the elements in the specified array to receive a signal, using a T:System.TimeSpan value to specify the time interval, and specifying whether to exit the synchronization domain before the wait. More... | |
static bool | WaitAll (WaitHandle[] waitHandles) |
Waits for all the elements in the specified array to receive a signal. More... | |
static bool | WaitAll (WaitHandle[] waitHandles, int millisecondsTimeout) |
Waits for all the elements in the specified array to receive a signal, using an T:System.Int32 value to specify the time interval. More... | |
static bool | WaitAll (WaitHandle[] waitHandles, TimeSpan timeout) |
Waits for all the elements in the specified array to receive a signal, using a T:System.TimeSpan value to specify the time interval. More... | |
static int | WaitAny (WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext) |
Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval, and specifying whether to exit the synchronization domain before the wait. More... | |
static int | WaitAny (WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext) |
Waits for any of the elements in the specified array to receive a signal, using a T:System.TimeSpan to specify the time interval and specifying whether to exit the synchronization domain before the wait. More... | |
static int | WaitAny (WaitHandle[] waitHandles, TimeSpan timeout) |
Waits for any of the elements in the specified array to receive a signal, using a T:System.TimeSpan to specify the time interval. More... | |
static int | WaitAny (WaitHandle[] waitHandles) |
Waits for any of the elements in the specified array to receive a signal. More... | |
static int | WaitAny (WaitHandle[] waitHandles, int millisecondsTimeout) |
Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval. More... | |
static bool | SignalAndWait (WaitHandle toSignal, WaitHandle toWaitOn) |
Signals one T:System.Threading.WaitHandle and waits on another. More... | |
static bool | SignalAndWait (WaitHandle toSignal, WaitHandle toWaitOn, TimeSpan timeout, bool exitContext) |
Signals one T:System.Threading.WaitHandle and waits on another, specifying the time-out interval as a T:System.TimeSpan and specifying whether to exit the synchronization domain for the context before entering the wait. More... | |
static bool | SignalAndWait (WaitHandle toSignal, WaitHandle toWaitOn, int millisecondsTimeout, bool exitContext) |
Signals one T:System.Threading.WaitHandle and waits on another, specifying a time-out interval as a 32-bit signed integer and specifying whether to exit the synchronization domain for the context before entering the wait. More... | |
Public Attributes | |
const int | WaitTimeout = 258 |
Indicates that a M:System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[],System.Int32,System.Boolean) operation timed out before any of the wait handles were signaled. This field is constant. More... | |
Protected Member Functions | |
WaitHandle () | |
Initializes a new instance of the T:System.Threading.WaitHandle class. More... | |
virtual void | Dispose (bool explicitDisposing) |
When overridden in a derived class, releases the unmanaged resources used by the T:System.Threading.WaitHandle, and optionally releases the managed resources. More... | |
![]() | |
MarshalByRefObject | MemberwiseClone (bool cloneIdentity) |
Creates a shallow copy of the current T:System.MarshalByRefObject object. More... | |
Static Protected Attributes | |
static readonly IntPtr | InvalidHandle = GetInvalidHandle() |
Represents an invalid native operating system handle. This field is read-only. More... | |
Properties | |
virtual IntPtr | Handle [get, set] |
Gets or sets the native operating system handle. More... | |
SafeWaitHandle | SafeWaitHandle [get, set] |
Gets or sets the native operating system handle. More... | |
Encapsulates operating system–specific objects that wait for exclusive access to shared resources.
Definition at line 15 of file WaitHandle.cs.
|
protected |
Initializes a new instance of the T:System.Threading.WaitHandle class.
Definition at line 131 of file WaitHandle.cs.
|
virtual |
Releases all resources held by the current T:System.Threading.WaitHandle.
Definition at line 714 of file WaitHandle.cs.
|
protectedvirtual |
When overridden in a derived class, releases the unmanaged resources used by the T:System.Threading.WaitHandle, and optionally releases the managed resources.
explicitDisposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Definition at line 725 of file WaitHandle.cs.
void System.Threading.WaitHandle.Dispose | ( | ) |
Releases all resources used by the current instance of the T:System.Threading.WaitHandle class.
Implements System.IDisposable.
Definition at line 735 of file WaitHandle.cs.
|
static |
Signals one T:System.Threading.WaitHandle and waits on another.
toSignal | The T:System.Threading.WaitHandle to signal. |
toWaitOn | The T:System.Threading.WaitHandle to wait on. |
true
if both the signal and the wait complete successfully; if the wait does not complete, the method does not return.T:System.ArgumentNullException | toSignal is null .-or- toWaitOn is null . |
T:System.NotSupportedException | The method was called on a thread that has T:System.STAThreadAttribute. |
T:System.PlatformNotSupportedException | This method is not supported on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | toSignal is a semaphore, and it already has a full count. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
Definition at line 613 of file WaitHandle.cs.
|
static |
Signals one T:System.Threading.WaitHandle and waits on another, specifying the time-out interval as a T:System.TimeSpan and specifying whether to exit the synchronization domain for the context before entering the wait.
toSignal | The T:System.Threading.WaitHandle to signal. |
toWaitOn | The T:System.Threading.WaitHandle to wait on. |
timeout | A T:System.TimeSpan that represents the interval to wait. If the value is -1, the wait is infinite. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
true
if both the signal and the wait completed successfully, or false
if the signal completed but the wait timed out.T:System.ArgumentNullException | toSignal is null .-or- toWaitOn is null . |
T:System.NotSupportedException | The method was called on a thread that has T:System.STAThreadAttribute. |
T:System.PlatformNotSupportedException | This method is not supported on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | toSignal is a semaphore, and it already has a full count. |
T:System.ArgumentOutOfRangeException | timeout evaluates to a negative number of milliseconds other than -1. -or- |
timeout is greater than F:System.Int32.MaxValue.
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
Definition at line 638 of file WaitHandle.cs.
|
static |
Signals one T:System.Threading.WaitHandle and waits on another, specifying a time-out interval as a 32-bit signed integer and specifying whether to exit the synchronization domain for the context before entering the wait.
toSignal | The T:System.Threading.WaitHandle to signal. |
toWaitOn | The T:System.Threading.WaitHandle to wait on. |
millisecondsTimeout | An integer that represents the interval to wait. If the value is F:System.Threading.Timeout.Infinite, that is, -1, the wait is infinite. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
true
if both the signal and the wait completed successfully, or false
if the signal completed but the wait timed out.T:System.ArgumentNullException | toSignal is null .-or- toWaitOn is null . |
T:System.NotSupportedException | The method is called on a thread that has T:System.STAThreadAttribute. |
T:System.PlatformNotSupportedException | This method is not supported on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | toSignal is a semaphore, and it already has a full count. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The T:System.Threading.WaitHandle cannot be signaled because it would exceed its maximum count. |
Definition at line 668 of file WaitHandle.cs.
|
static |
Waits for all the elements in the specified array to receive a signal, using an T:System.Int32 value to specify the time interval and specifying whether to exit the synchronization domain before the wait.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object (duplicates). |
millisecondsTimeout | The number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
true
when every element in waitHandles has received a signal; otherwise, false
.T:System.ArgumentNullException | The waitHandles parameter is null .-or- One or more of the objects in the waitHandles array is null . -or- waitHandles is an array with no elements and the .NET Framework version is 2.0 or later. |
T:System.DuplicateWaitObjectException | The waitHandles array contains elements that are duplicates. |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits.-or- The T:System.STAThreadAttribute attribute is applied to the thread procedure for the current thread, and waitHandles contains more than one element. |
T:System.ApplicationException | waitHandles is an array with no elements and the .NET Framework version is 1.0 or 1.1. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 305 of file WaitHandle.cs.
|
static |
Waits for all the elements in the specified array to receive a signal, using a T:System.TimeSpan value to specify the time interval, and specifying whether to exit the synchronization domain before the wait.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object. |
timeout | A T:System.TimeSpan that represents the number of milliseconds to wait, or a T:System.TimeSpan that represents -1 milliseconds, to wait indefinitely. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
true
when every element in waitHandles has received a signal; otherwise false
.T:System.ArgumentNullException | The waitHandles parameter is null . -or- One or more of the objects in the waitHandles array is null . -or- waitHandles is an array with no elements and the .NET Framework version is 2.0 or later. |
T:System.DuplicateWaitObjectException | The waitHandles array contains elements that are duplicates. |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits.-or- The T:System.STAThreadAttribute attribute is applied to the thread procedure for the current thread, and waitHandles contains more than one element. |
T:System.ApplicationException | waitHandles is an array with no elements and the .NET Framework version is 1.0 or 1.1. |
T:System.ArgumentOutOfRangeException | timeout is a negative number other than -1 milliseconds, which represents an infinite time-out. -or- |
timeout is greater than F:System.Int32.MaxValue.
T:System.Threading.AbandonedMutexException | The wait terminated because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 369 of file WaitHandle.cs.
|
static |
Waits for all the elements in the specified array to receive a signal.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object. |
true
when every element in waitHandles has received a signal; otherwise the method never returns.T:System.ArgumentNullException | The waitHandles parameter is null . -or- One or more of the objects in the waitHandles array are null . -or- waitHandles is an array with no elements and the .NET Framework version is 2.0 or later. |
T:System.DuplicateWaitObjectException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.ArgumentException, instead.The waitHandles array contains elements that are duplicates. |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits.-or- The T:System.STAThreadAttribute attribute is applied to the thread procedure for the current thread, and waitHandles contains more than one element. |
T:System.ApplicationException | waitHandles is an array with no elements and the .NET Framework version is 1.0 or 1.1. |
T:System.Threading.AbandonedMutexException | The wait terminated because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 393 of file WaitHandle.cs.
|
static |
Waits for all the elements in the specified array to receive a signal, using an T:System.Int32 value to specify the time interval.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object (duplicates). |
millisecondsTimeout | The number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely. |
true
when every element in waitHandles has received a signal; otherwise, false
.T:System.ArgumentNullException | The waitHandles parameter is null .-or- One or more of the objects in the waitHandles array is null . -or- waitHandles is an array with no elements. |
T:System.DuplicateWaitObjectException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.ArgumentException, instead.The waitHandles array contains elements that are duplicates. |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits.-or- The T:System.STAThreadAttribute attribute is applied to the thread procedure for the current thread, and waitHandles contains more than one element. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 413 of file WaitHandle.cs.
|
static |
Waits for all the elements in the specified array to receive a signal, using a T:System.TimeSpan value to specify the time interval.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object. |
timeout | A T:System.TimeSpan that represents the number of milliseconds to wait, or a T:System.TimeSpan that represents -1 milliseconds, to wait indefinitely. |
true
when every element in waitHandles has received a signal; otherwise, false
.T:System.ArgumentNullException | The waitHandles parameter is null . -or- One or more of the objects in the waitHandles array is null . -or- waitHandles is an array with no elements. |
T:System.DuplicateWaitObjectException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.ArgumentException, instead.The waitHandles array contains elements that are duplicates. |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits.-or- The T:System.STAThreadAttribute attribute is applied to the thread procedure for the current thread, and waitHandles contains more than one element. |
T:System.ArgumentOutOfRangeException | timeout is a negative number other than -1 milliseconds, which represents an infinite time-out. -or- timeout is greater than F:System.Int32.MaxValue. |
T:System.Threading.AbandonedMutexException | The wait terminated because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 434 of file WaitHandle.cs.
|
static |
Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval, and specifying whether to exit the synchronization domain before the wait.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. |
millisecondsTimeout | The number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
T:System.ArgumentNullException | The waitHandles parameter is null .-or-One or more of the objects in the waitHandles array is null . |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits. |
T:System.ApplicationException | waitHandles is an array with no elements, and the .NET Framework version is 1.0 or 1.1. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.ArgumentException | waitHandles is an array with no elements, and the .NET Framework version is 2.0 or later. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 457 of file WaitHandle.cs.
|
static |
Waits for any of the elements in the specified array to receive a signal, using a T:System.TimeSpan to specify the time interval and specifying whether to exit the synchronization domain before the wait.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. |
timeout | A T:System.TimeSpan that represents the number of milliseconds to wait, or a T:System.TimeSpan that represents -1 milliseconds to wait indefinitely. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
T:System.ArgumentNullException | The waitHandles parameter is null .-or-One or more of the objects in the waitHandles array is null . |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits. |
T:System.ApplicationException | waitHandles is an array with no elements, and the .NET Framework version is 1.0 or 1.1. |
T:System.ArgumentOutOfRangeException | timeout is a negative number other than -1 milliseconds, which represents an infinite time-out. -or- |
timeout is greater than F:System.Int32.MaxValue.
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.ArgumentException | waitHandles is an array with no elements, and the .NET Framework version is 2.0 or later. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 529 of file WaitHandle.cs.
|
static |
Waits for any of the elements in the specified array to receive a signal, using a T:System.TimeSpan to specify the time interval.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. |
timeout | A T:System.TimeSpan that represents the number of milliseconds to wait, or a T:System.TimeSpan that represents -1 milliseconds to wait indefinitely. |
T:System.ArgumentNullException | The waitHandles parameter is null .-or-One or more of the objects in the waitHandles array is null . |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits. |
T:System.ArgumentOutOfRangeException | timeout is a negative number other than -1 milliseconds, which represents an infinite time-out. -or- timeout is greater than F:System.Int32.MaxValue. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.ArgumentException | waitHandles is an array with no elements. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 554 of file WaitHandle.cs.
|
static |
Waits for any of the elements in the specified array to receive a signal.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. |
T:System.ArgumentNullException | The waitHandles parameter is null .-or-One or more of the objects in the waitHandles array is null . |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits. |
T:System.ApplicationException | waitHandles is an array with no elements, and the .NET Framework version is 1.0 or 1.1. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.ArgumentException | waitHandles is an array with no elements, and the .NET Framework version is 2.0 or later. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 572 of file WaitHandle.cs.
|
static |
Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to specify the time interval.
waitHandles | A WaitHandle array containing the objects for which the current instance will wait. |
millisecondsTimeout | The number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely. |
T:System.ArgumentNullException | The waitHandles parameter is null .-or-One or more of the objects in the waitHandles array is null . |
T:System.NotSupportedException | The number of objects in waitHandles is greater than the system permits. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.ArgumentException | waitHandles is an array with no elements. |
T:System.InvalidOperationException | The waitHandles array contains a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 591 of file WaitHandle.cs.
|
virtual |
Blocks the current thread until the current T:System.Threading.WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval and specifying whether to exit the synchronization domain before the wait.
millisecondsTimeout | The number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
true
if the current instance receives a signal; otherwise, false
.T:System.ObjectDisposedException | The current instance has already been disposed. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The current instance is a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 162 of file WaitHandle.cs.
|
virtual |
Blocks the current thread until the current instance receives a signal, using a T:System.TimeSpan to specify the time interval and specifying whether to exit the synchronization domain before the wait.
timeout | A T:System.TimeSpan that represents the number of milliseconds to wait, or a T:System.TimeSpan that represents -1 milliseconds to wait indefinitely. |
exitContext | true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false . |
true
if the current instance receives a signal; otherwise, false
.T:System.ObjectDisposedException | The current instance has already been disposed. |
T:System.ArgumentOutOfRangeException | timeout is a negative number other than -1 milliseconds, which represents an infinite time-out.-or- |
timeout is greater than F:System.Int32.MaxValue.
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The current instance is a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 184 of file WaitHandle.cs.
|
virtual |
Blocks the current thread until the current T:System.Threading.WaitHandle receives a signal.
true
if the current instance receives a signal. If the current instance is never signaled, M:System.Threading.WaitHandle.WaitOne(System.Int32,System.Boolean) never returns.T:System.ObjectDisposedException | The current instance has already been disposed. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The current instance is a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 201 of file WaitHandle.cs.
|
virtual |
Blocks the current thread until the current T:System.Threading.WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval in milliseconds.
millisecondsTimeout | The number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely. |
true
if the current instance receives a signal; otherwise, false
.T:System.ObjectDisposedException | The current instance has already been disposed. |
T:System.ArgumentOutOfRangeException | millisecondsTimeout is a negative number other than -1, which represents an infinite time-out. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The current instance is a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 216 of file WaitHandle.cs.
|
virtual |
Blocks the current thread until the current instance receives a signal, using a T:System.TimeSpan to specify the time interval.
timeout | A T:System.TimeSpan that represents the number of milliseconds to wait, or a T:System.TimeSpan that represents -1 milliseconds to wait indefinitely. |
true
if the current instance receives a signal; otherwise, false
.T:System.ObjectDisposedException | The current instance has already been disposed. |
T:System.ArgumentOutOfRangeException | timeout is a negative number other than -1 milliseconds, which represents an infinite time-out.-or- timeout is greater than F:System.Int32.MaxValue. |
T:System.Threading.AbandonedMutexException | The wait completed because a thread exited without releasing a mutex. This exception is not thrown on Windows 98 or Windows Millennium Edition. |
T:System.InvalidOperationException | The current instance is a transparent proxy for a T:System.Threading.WaitHandle in another application domain. |
Definition at line 232 of file WaitHandle.cs.
|
staticprotected |
Represents an invalid native operating system handle. This field is read-only.
Definition at line 39 of file WaitHandle.cs.
const int System.Threading.WaitHandle.WaitTimeout = 258 |
Indicates that a M:System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[],System.Int32,System.Boolean) operation timed out before any of the wait handles were signaled. This field is constant.
Definition at line 27 of file WaitHandle.cs.
|
getset |
Gets or sets the native operating system handle.
IntPtr
representing the native operating system handle. The default is the value of the F:System.Threading.WaitHandle.InvalidHandle field.Definition at line 53 of file WaitHandle.cs.
|
getset |
Gets or sets the native operating system handle.
Definition at line 86 of file WaitHandle.cs.