public void SetPriority(int id, int priority) { lock (_thisLock) { var item = _idManager.GetItem(id); item.Priority = priority; } }