示例#1
0
 public void Dispatch()
 {
     for (int i = 0; i < 30; i++)
     {
         if (dispatchQueue.Count > 0)
         {
             DispatchData data = dispatchQueue.Dequeue();
             data.action(data);
         }
         else
         {
             break;
         }
     }
 }
示例#2
0
        public void Enqueue(Delegate a, PacketHeader p, Connection c, MessageData m)
        {
            DispatchData data = new DispatchData((Action <DispatchData>)a, p, c, m);

            dispatchQueue.Enqueue(data);
        }