WaitOne() causes another overload:
https://referencesource.microsoft.com/#mscorlib/system/threading/waithandle.cs,212
public virtual bool WaitOne () { //Infinite Timeout return WaitOne(-1,false); }
Next comes the call to the static method InternalWaitOne :
https://referencesource.microsoft.com/#mscorlib/system/threading/waithandle.cs,235
[System.Security.SecurityCritical] // auto-generated internal static bool InternalWaitOne(SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext) { if (waitableSafeHandle == null) { throw new ObjectDisposedException(null, Environment.GetResourceString("ObjectDisposed_Generic")); } Contract.EndContractBlock(); int ret = WaitOneNative(waitableSafeHandle, (uint)millisecondsTimeout, hasThreadAffinity, exitContext); if(AppDomainPauseManager.IsPaused) AppDomainPauseManager.ResumeEvent.WaitOneWithoutFAS(); if (ret == WAIT_ABANDONED) { ThrowAbandonedMutexException(); } return (ret != WaitTimeout); }
WaitOneNative then calls the WinAPI function WaitForSingleObjectEx . So WaitOne with no parameters will either return true , or throw an AbandonedMutexException . Since WaitForSingleObjectEx cannot return WAIT_TIMEOUT status if an infinite timeout is specified.
https://docs.microsoft.com/en-us/windows/desktop/api/synchapi/nf-synchapi-waitforsingleobjectex