Catel.Threading.AsyncLock.ReleaseLock C# (CSharp) Method

ReleaseLock() private method

Releases the lock.
private ReleaseLock ( ) : void
return void
        internal void ReleaseLock()
        {
            IDisposable finish = null;

            lock (_mutex)
            {
                //Enlightenment.Trace.AsyncLock_Unlocked(this);
                if (_queue.IsEmpty)
                {
                    _taken = false;
                }
                else
                {
                    finish = _queue.Dequeue(_cachedKeyTask.Result);
                }
            }
            if (finish != null)
            {
                finish.Dispose();
            }
        }

Usage Example

コード例 #1
0
 /// <summary>
 /// Release the lock.
 /// </summary>
 public void Dispose()
 {
     _asyncLock.ReleaseLock();
 }