mscorlib 2.0.0.0 4.0.0.0 System.SystemException System.Runtime.InteropServices.ComVisible(false)

When a thread abandons a mutex, the exception is thrown in the next thread that acquires the mutex. The thread might acquire the mutex because it was already waiting on the mutex or because it enters the mutex at a later time.

An abandoned mutex indicates a serious programming error. When a thread exits without releasing the mutex, the data structures protected by the mutex might not be in a consistent state. Prior to version 2.0 of the .NET Framework, such problems were hard to discover because no exception was thrown if a wait completed as the result of an abandoned mutex. For more information, see the class.

The next thread to request ownership of the mutex can handle this exception and proceed, provided that the integrity of the data structures can be verified.

The exception that is thrown when one thread acquires a object that another thread has abandoned by exiting without releasing it.

- Constructor
  2.0.0.0
  4.0.0.0

  This constructor initializes the property of the new instance to a system-supplied message that describes the error, such as "The wait completed due to an abandoned mutex." This message takes into account the current system culture.

  The following table shows the initial property values for an instance of .

  Property

  Value

  null.

  The system-supplied error message string.

  null.

  –1 (minus one).

  Initializes a new instance of the class with default values.

- Constructor
  2.0.0.0
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  The following table shows the initial property values for an instance of initialized with this constructor.

  Property

  Value

  null.

  .

  null.

  –1 (minus one).

  Initializes a new instance of the class with a specified error message.

  An error message that explains the reason for the exception.
- Constructor
  2.0.0.0
  4.0.0.0

  This constructor initializes the property of the new instance to a system-supplied message that describes the error, such as "The wait completed due to an abandoned mutex." This message takes into account the current system culture.

  The following table shows the initial property values for an instance of initialized with this constructor.

  Property

  Value

  null.

  A system-supplied error message string.

  .

  .

  Initializes a new instance of the class with a specified index for the abandoned mutex, if applicable, and a object that represents the mutex.

  The index of the abandoned mutex in the array of wait handles if the exception is thrown for the method, or –1 if the exception is thrown for the or methods.
  A object that represents the abandoned mutex.
- Constructor
  2.0.0.0
  4.0.0.0

  This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see XML and SOAP Serialization.

  Initializes a new instance of the class with serialized data.

  The object that holds the serialized object data about the exception being thrown.
  The object that contains contextual information about the source or destination.
- Constructor
  2.0.0.0
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or null if the property does not supply the inner exception value to the constructor.

  The following table shows the initial property values for an instance of initialized with this constructor.

  Property

  Value

  .

  .

  null.

  –1 (minus one).

  Initializes a new instance of the class with a specified error message and inner exception.

  An error message that explains the reason for the exception.
  The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
- Constructor
  2.0.0.0
  4.0.0.0

  The content of is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  The following table shows the initial property values for an instance of initialized with this constructor.

  Property

  Value

  null.

  .

  .

  .

  Initializes a new instance of the class with a specified error message, the index of the abandoned mutex, if applicable, and the abandoned mutex.

  An error message that explains the reason for the exception.
  The index of the abandoned mutex in the array of wait handles if the exception is thrown for the method, or –1 if the exception is thrown for the or methods.
  A object that represents the abandoned mutex.
- Constructor
  2.0.0.0
  4.0.0.0

  The content of is a text string intended to inform the user about the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

  An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or null if the property does not supply the inner exception value to the constructor.

  The following table shows the initial property values for an instance of initialized with this constructor.

  Property

  Value

  .

  .

  .

  .

  Initializes a new instance of the class with a specified error message, the inner exception, the index for the abandoned mutex, if applicable, and a object that represents the mutex.

  An error message that explains the reason for the exception.
  The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
  The index of the abandoned mutex in the array of wait handles if the exception is thrown for the method, or –1 if the exception is thrown for the or methods.
  A object that represents the abandoned mutex.
- Property
  2.0.0.0
  4.0.0.0
  System.Threading.Mutex To be added.

  If the exception is thrown on a call to the method, the returned is the abandoned mutex with the lowest index in the array of objects that was passed to , or null if the abandoned mutex could not be identified. If the exception is thrown on a call to or , this property always returns null.

  Gets the abandoned mutex that caused the exception, if known.

- Property
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  If the exception is thrown on a call to the method, this property returns the index of the abandoned mutex with the lowest index in the array of objects that was passed to , or –1 if the abandoned mutex could not be identified. If the exception is thrown on a call to or , this property always returns –1.

  Gets the index of the abandoned mutex that caused the exception, if known.