WaitOneNative() private method

private WaitOneNative ( SafeWaitHandle waitHandle, uint millisecondsTimeout, bool hasThreadAffinity, bool exitContext ) : int
waitHandle SafeWaitHandle
millisecondsTimeout uint
hasThreadAffinity bool
exitContext bool
return int
Exemplo n.º 1
0
        internal bool WaitOneWithoutFAS()
        {
            if (this.safeWaitHandle == null)
            {
                throw new ObjectDisposedException((string)null, Environment.GetResourceString("ObjectDisposed_Generic"));
            }
            int num1 = WaitHandle.WaitOneNative((SafeHandle)this.safeWaitHandle, uint.MaxValue, this.hasThreadAffinity, false);
            int num2 = 128;

            if (num1 == num2)
            {
                WaitHandle.ThrowAbandonedMutexException();
            }
            int num3 = 258;

            return(num1 != num3);
        }
Exemplo n.º 2
0
        internal static bool InternalWaitOne(SafeHandle waitableSafeHandle, long millisecondsTimeout, bool hasThreadAffinity, bool exitContext)
        {
            if (waitableSafeHandle == null)
            {
                throw new ObjectDisposedException((string)null, Environment.GetResourceString("ObjectDisposed_Generic"));
            }
            int num1 = WaitHandle.WaitOneNative(waitableSafeHandle, (uint)millisecondsTimeout, hasThreadAffinity, exitContext);

            if (AppDomainPauseManager.IsPaused)
            {
                AppDomainPauseManager.ResumeEvent.WaitOneWithoutFAS();
            }
            int num2 = 128;

            if (num1 == num2)
            {
                WaitHandle.ThrowAbandonedMutexException();
            }
            int num3 = 258;

            return(num1 != num3);
        }