public void withWriteLockAndDelegate(Procedure<MutableSet<T>> procedure) { this.acquireWriteLock(); try { UntouchableMutableSet<T> untouchableSet = this.asWriteUntouchable(); procedure.value(untouchableSet); untouchableSet.becomeUseless(); } finally { this.unlockWriteLock(); } }
public void withReadLockAndDelegate(Procedure<MutableSet<T>> procedure) { this.acquireReadLock(); try { UntouchableMutableSet<T> untouchableSet = this.asReadUntouchable(); procedure.value(untouchableSet); untouchableSet.becomeUseless(); } finally { this.unlockReadLock(); } }
public void withWriteLockAndDelegate(Procedure<MutableSet<T>> procedure) { this.acquireWriteLock(); try { UntouchableMutableSet<T> untouchableSet = this.asWriteUntouchable(); procedure.value(untouchableSet); untouchableSet.becomeUseless(); } finally { this.unlockWriteLock(); } }
public void withWriteLockAndDelegate(Procedure<MutableSet<T>> procedure) { this.acquireWriteLock(); try { UntouchableMutableSet<T> untouchableSet = this.asWriteUntouchable(); procedure.value(untouchableSet); untouchableSet.becomeUseless(); } finally { this.unlockWriteLock(); } }
public void withReadLockAndDelegate(Procedure<MutableSet<T>> procedure) { this.acquireReadLock(); try { UntouchableMutableSet<T> untouchableSet = this.asReadUntouchable(); procedure.value(untouchableSet); untouchableSet.becomeUseless(); } finally { this.unlockReadLock(); } }
public void withReadLockAndDelegate(Procedure<MutableSet<T>> procedure) { this.acquireReadLock(); try { UntouchableMutableSet<T> untouchableSet = this.asReadUntouchable(); procedure.value(untouchableSet); untouchableSet.becomeUseless(); } finally { this.unlockReadLock(); } }