예제 #1
0
 public void TakeEmpty_Linked()
 {
     for (int i = 0; i < OpsPerInvoke; i++)
     {
         SimplifiedPool <object> .TryGet();
     }
 }
예제 #2
0
        public void PushPopOnce_Linked()
        {
            for (int i = 0; i < OpsPerInvoke; i++)
            {
                SimplifiedPool <object> .TryPut(s_TestObject);

                SimplifiedPool <object> .TryGet();
            }
        }
예제 #3
0
 public void PushPopCapacity_Linked()
 {
     for (int i = 0; i < OpsPerInvoke / Capacity; i++)
     {
         for (int j = 0; j < Capacity; j++)
         {
             SimplifiedPool <object> .TryPut(s_TestObject);
         }
         for (int j = 0; j < Capacity; j++)
         {
             SimplifiedPool <object> .TryGet();
         }
     }
 }
예제 #4
0
 public void Reset()
 {
     while (Util <object> .TryGet(_queue) != null)
     {
     }
     while (Util <object> .TryGet(_stack) != null)
     {
     }
     while (Util <object> .TryGet(_array) != null)
     {
     }
     while (SimplifiedPool <object> .TryGet() != null)
     {
     }
 }