AbandonedMutexException.Mutex 屬性

定義

取得造成例外狀況的已放棄 Mutex (若為已知)。Gets the abandoned mutex that caused the exception, if known.

public:
 property System::Threading::Mutex ^ Mutex { System::Threading::Mutex ^ get(); };
public System.Threading.Mutex Mutex { get; }
public System.Threading.Mutex? Mutex { get; }
member this.Mutex : System.Threading.Mutex
Public ReadOnly Property Mutex As Mutex

屬性值

Mutex

Mutex 物件,表示已放棄的 Mutex;若無法識別已放棄的 Mutex,則為 nullA Mutex object that represents the abandoned mutex, or null if the abandoned mutex could not be identified.

備註

如果在呼叫方法時擲回例外狀況 WaitHandle.WaitAny ,則傳回的 Mutex 是在傳遞至之物件陣列中具有最低索引的已放棄 mutex WaitHandle WaitAny ,或者, null 如果無法識別放棄的 mutex。If the exception is thrown on a call to the WaitHandle.WaitAny method, the Mutex returned is the abandoned mutex with the lowest index in the array of WaitHandle objects that was passed to WaitAny, or null if the abandoned mutex could not be identified. 如果在或的呼叫上擲回例外 WaitOne 狀況 WaitAll ,則這個屬性一律會傳回 nullIf the exception is thrown on a call to WaitOne or WaitAll, this property always returns null.

適用於

另請參閱