Exemple #1
0
 private static void Excute()
 {
     while (_isStart)
     {
         try
         {
             if (_queue.Count > 0)
             {
                 ISyncExcute syncItem = _queue.Dequeue();
                 syncItem.SyncExcute();
             }
         }
         catch (Exception e)
         {
             Debug.LogError("thread error " + e.Message);
         }
     }
 }
Exemple #2
0
 public static void AddItem(ISyncExcute syncItem)
 {
     _queue.Enqueue(syncItem);
 }