private void mCoordinator_HeightmapChanged(object source, HeightmapChangedEventArgs args) { lock (mHeightmapUpdates) { mHeightmapUpdates.Enqueue(args); //If there's no thread if (mHeightmapUpdateThread == null) { mHeightmapUpdateThread = new Thread(HeightmapUpdateThread); mHeightmapUpdateThread.Name = "Heightmap update thread."; mHeightmapUpdateThread.Start(); } } }