public bool TryAcquire()
        {
            Thread thread   = Thread.CurrentThread;
            int    threadId = (thread == null)?InitialThreadId:thread.GetThreadId();

            return(TryAcquireInternal(thread, threadId));
        }
        public void Acquire()
        {
            Thread thread   = Thread.CurrentThread;
            int    threadId = (thread == null)?InitialThreadId:thread.GetThreadId();

            AcquireInternal(thread, threadId);
        }
        public void Release(Thread thread)
        {
            int threadId = (thread == null)?InitialThreadId:thread.GetThreadId();

            // Release spinlock
            ReleaseInternal(thread, threadId);
        }
Esempio n. 4
0
        public void Release()
        {
            Thread thread = Thread.CurrentThread;

            // Release spinlock
            ReleaseInternal(thread, thread.GetThreadId());
        }
        public void Release()
        {
            Thread thread   = Thread.CurrentThread;
            int    threadId = (thread == null)?InitialThreadId:
                              thread.GetThreadId();

            // Release spinlock
            ReleaseInternal(thread, threadId);
        }
        public bool IsHeldBy(Thread thread)
        {
            int threadId = (thread == null)?InitialThreadId:thread.GetThreadId();

            return(baseLock.IsHeldBy(threadId + 1));
        }
        public bool TryAcquire(Thread thread)
        {
            int threadId = (thread == null)?InitialThreadId:thread.GetThreadId();

            return(TryAcquireInternal(thread, thread.GetThreadId()));
        }
        public void Acquire(Thread thread)
        {
            int threadId = (thread == null)?InitialThreadId:thread.GetThreadId();

            AcquireInternal(thread, threadId);
        }
Esempio n. 9
0
 public void Release(Thread thread)
 {
     // Release spinlock
     ReleaseInternal(thread, thread.GetThreadId());
 }
Esempio n. 10
0
 public void Acquire(Thread thread)
 {
     AcquireInternal(thread, thread.GetThreadId());
 }
Esempio n. 11
0
        public void Acquire()
        {
            Thread thread = Thread.CurrentThread;

            AcquireInternal(thread, thread.GetThreadId());
        }
Esempio n. 12
0
 public bool IsHeldBy(Thread thread)
 {
     return(baseLock.IsHeldBy(thread.GetThreadId() + 1));
 }
Esempio n. 13
0
        public bool TryAcquire(Thread thread)
        {
            int threadId = thread.GetThreadId();

            return(TryAcquireInternal(thread, thread.GetThreadId()));
        }
Esempio n. 14
0
        public bool TryAcquire()
        {
            Thread thread = Thread.CurrentThread;

            return(TryAcquireInternal(thread, thread.GetThreadId()));
        }