diff options
Diffstat (limited to 'src/mscorlib/src/System/Threading/ManualResetEventSlim.cs')
-rw-r--r-- | src/mscorlib/src/System/Threading/ManualResetEventSlim.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs b/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs index 2d57b4102b..c0bdbcece2 100644 --- a/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs +++ b/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs @@ -20,7 +20,6 @@ using System.Diagnostics.Contracts; namespace System.Threading { - // ManualResetEventSlim wraps a manual-reset event internally with a little bit of // spinning. When an event will be set imminently, it is often advantageous to avoid // a 4k+ cycle context switch in favor of briefly spinning. Therefore we layer on to @@ -98,7 +97,6 @@ namespace System.Threading /// </remarks> public WaitHandle WaitHandle { - get { ThrowIfDisposed(); @@ -169,7 +167,6 @@ namespace System.Threading UpdateStateAtomically(value << NumWaitersState_ShiftCount, NumWaitersState_BitMask); } - } //----------------------------------------------------------------------------------- @@ -184,7 +181,6 @@ namespace System.Threading public ManualResetEventSlim() : this(false) { - } /// <summary> @@ -236,14 +232,13 @@ namespace System.Threading /// <param name="spinCount">The spin count that decides when the event will block.</param> private void Initialize(bool initialState, int spinCount) { - this.m_combinedState = initialState ? (1 << SignalledState_ShiftCount) : 0; + m_combinedState = initialState ? (1 << SignalledState_ShiftCount) : 0; //the spinCount argument has been validated by the ctors. //but we now sanity check our predefined constants. Debug.Assert(DEFAULT_SPIN_SP >= 0, "Internal error - DEFAULT_SPIN_SP is outside the legal range."); Debug.Assert(DEFAULT_SPIN_SP <= SpinCountState_MaxValue, "Internal error - DEFAULT_SPIN_SP is outside the legal range."); SpinCount = PlatformHelper.IsSingleProcessor ? DEFAULT_SPIN_SP : spinCount; - } /// <summary> @@ -283,7 +278,6 @@ namespace System.Threading } else { - // Now that the event is published, verify that the state hasn't changed since // we snapped the preInitializeState. Another thread could have done that // between our initial observation above and here. The barrier incurred from @@ -337,7 +331,6 @@ namespace System.Threading Debug.Assert(m_lock != null); //if waiters>0, then m_lock has already been created. lock (m_lock) { - Monitor.PulseAll(m_lock); } } @@ -665,7 +658,6 @@ namespace System.Threading // Now just loop back around, and the right thing will happen. Either: // 1. We had a spurious wake-up due to some other wait being canceled via a different cancellationToken (rewait) // or 2. the wait was successful. (the loop will break) - } } } |