/// <summary> /// Attempt to lock the specified lock. /// If the lock is acquired, add the lock to the accumulated list of locks. /// Return the gotLock result. /// </summary> /// <param name="LockToLock"></param> /// <returns></returns> public bool Lock(IGenericLock LockToLock) { bool gotLock = LockToLock.Lock(); if (gotLock == true) { AccumulatedLocks.Add(LockToLock); } else { this.GotAllLocks = false; } return(gotLock); }
public YieldUntilLock(params IGenericLock[] ManyLocks) { _Lock = null; _ManyLocks = ManyLocks; }
public YieldUntilLock(IGenericLock Lock) { _Lock = Lock; _ManyLocks = null; _GotLock = this.DoYieldUntilLock( ); }