Beispiel #1
0
 public static void Push(StoreProcessor item)
 {
     //lock (_pool)
     //{
         item.Update(true);
         _pool.Push(item);
     //}
 }
Beispiel #2
0
 //public static void Push(Entity.CurrencyInfo value)
 //{
 //    Init();
 //    var index = Convert.ToInt32(Interlocked.Increment(ref _index) % capacity);
 //    var store = _pool[index];
 //    store.Add(value);
 //}
 static void Init()
 {
     for (int i = 0; i < capacity; i++)
     {
         var item = new StoreProcessor(i);
         _pool.Push(item);
     }
 }