private void Update() { if (dataQueue.Count > 0) { for (int i = 0; i < dataQueue.Count; i++) { ThreadInfo threadInfo = dataQueue.Dequeue(); threadInfo.Callback(threadInfo.Parameter); } } }
void Update() { if (mapDataThreadInfoQueue.Count > 0) { for (int i = 0; i < mapDataThreadInfoQueue.Count; i++) { ThreadInfo <MapData> threadInfo = mapDataThreadInfoQueue.Dequeue(); threadInfo.Callback(threadInfo.Parameter); } } if (meshDataThreadInfoQueue.Count > 0) { for (int i = 0; i < meshDataThreadInfoQueue.Count; i++) { ThreadInfo <MeshData> threadInfo = meshDataThreadInfoQueue.Dequeue(); threadInfo.Callback(threadInfo.Parameter); } } }