Example #1
0
 ///
 /// <summary>
 /// Constructor
 /// </summary>
 ///
 /// <param name="initialState">Initial state of an handle </param>
 /// <param name="signalStateAfterImediateWait">
 ///  Value represents a state of a handle when wait satisfied right a way
 /// </param>
 /// <param name="spinLockType">The spin lock type of the wait handle</param>
 ///
 protected WaitHandle(
     SignalState initialState,
     SignalState signalStateAfterImediateWait,
     SpinLock.Types spinLockType)
     : base(initialState, signalStateAfterImediateWait)
 {
     this.singleHandle = new WaitHandle[1] {
         this
     };
     // Initialize waithandle spinlock
     this.myLock = new SpinLock(spinLockType);
 }
Example #2
0
        public SmartSpinlock(SpinLock.Types type)
        {
#if SINGULARITY_MP
            this.spin = new SpinLock(type);
#endif
        }