예제 #1
0
 public EventPool(EventPoolMode eventPoolMode, int maxOperatorNumber = 64)
 {
     events                 = new Dictionary <int, EventHandler <T> >();
     eventList              = new SafetyQueue <LE_Event <T> >();
     this.eventPoolMode     = eventPoolMode;
     this.maxOperatorNumber = maxOperatorNumber;
 }
예제 #2
0
 public void Init()
 {
     threads = new Thread[Number];
     for (int i = 0; i < Number; i++)
     {
         threads[i] = new Thread(Add)
         {
             Name = i.ToString()
         };
     }
     queue = new SafetyQueue <A0>();
 }