private void UpdateData() { while (true) { if (_inserWorkModel.Count == 0) { _idleCommandSendEvent.WaitOne(); } else { WorkModel workModel = _inserWorkModel.Dequeue(); if (_workManager.CreateWorkNumber(workModel)) { setControl(false, workModel); } } } }