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); } } }
public static void AddItem(ISyncExcute syncItem) { _queue.Enqueue(syncItem); }