private void LoadProc() { while (mIsRunning) { MapArea loadTile = null; lock (mDataToLoad) { if (mDataToLoad.Count > 0) { loadTile = mDataToLoad[0]; mDataToLoad.RemoveAt(0); } } if (loadTile != null) { loadTile.AsyncLoad(); lock (mLoadedData) mLoadedData.Add(loadTile); } else { Thread.Sleep(30); } } }