CClash.CacheInfo.LockStatsCall C# (CSharp) Method

LockStatsCall() public method

public LockStatsCall ( Action x ) : void
x Action
return void
        public void LockStatsCall(Action x)
        {
            statMtx.WaitOne();
            x.Invoke();
            statMtx.ReleaseMutex(); 
        }

Usage Example

Example #1
0
 public void Commit()
 {
     var real = new CacheInfo(statstore);
     real.LockStatsCall(() =>
     {
         real.SlowHitCount += this.SlowHitCount;
         real.CacheUnsupported += this.CacheUnsupported;
         real.CacheSize += this.CacheSize;
         real.CacheObjects += this.CacheObjects;
         real.CacheMisses += this.CacheMisses;
         real.CacheHits += this.CacheHits;
     });
 }
All Usage Examples Of CClash.CacheInfo::LockStatsCall