public void Render() { RenderTask newTask = null; lock (_queueLock) { if (_taskQ.Count > 0) { newTask = _taskQ[0]; _taskQ.RemoveAt(0); } } if (newTask != null) { Update(newTask.getSubscriber(), newTask.getMsg()); } if (_serviceName != null) { ServiceResponse(_serviceResponse, _serviceName, _serviceValues); _serviceName = null; } }