Exemplo n.º 1
0
 public void Update()
 {
     while (tpQue.Count > 0)
     {
         TaskPack tp = null;
         lock (tpQueLock){
             tp = tpQue.Dequeue();
         }
         if (tp != null)
         {
             tp.cb(tp.tid);
         }
     }
 }
Exemplo n.º 2
0
 private void Update()
 {
     if (timerQueue.Count > 0)
     {
         TaskPack taskPack = null;
         lock (lockTask)
         {
             taskPack = timerQueue.Dequeue();
             if (taskPack != null)
             {
                 taskPack.cb();
             }
         }
     }
 }