Bari.Core.Build.Cache.FileBuildCache.LockForBuilder C# (CSharp) Method

LockForBuilder() public method

Locks the cache for a given builder.

Until calling IBuildCache.UnlockForBuilder, it is guaranteed that no IBuildCache.Store operation will be ran for the given builder from other threads.

public LockForBuilder ( BuildKey builder ) : void
builder BuildKey Builder key
return void
        public void LockForBuilder(BuildKey builder)
        {
            var lck = GetOrCreateLock(builder);
            lck.EnterUpgradeableReadLock();
        }