Ejemplo n.º 1
0
 static ScopeCounters()
 {
     _cache = new ScopeGlobalCounter[byte.MaxValue + 1];
     for (byte i = byte.MaxValue; ; i--)
     {
         _cache[i] = new ScopeGlobalCounter(i);
         if (i == 0)
         {
             break;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>Decrements the reference count of a global scope</summary>
 /// <param name="scope">The global scope</param>
 private static void ReleaseOne(ScopeGlobalCounter scope)
 {
     Interlocked.Decrement(ref scope._count);
 }