@Override
	public Parameter addParameter(Variable var, SourceType source)
			throws DuplicateNameException, InvalidInputException {
		manager.lock.acquire();
		try {
			startUpdate();
			checkDeleted();
			if (thunkedFunction != null) {
				return thunkedFunction.addParameter(var, source);
			}
			loadVariables();
			purgeBadVariables();

			return insertParameter(getParameterCount(), var, source);
		}
		finally {
			endUpdate();
			manager.lock.release();
		}
	}
Decrement updateInProgressCount indicating that an update operation has completed and 
check the updateRefreshReqd flag and perform refresh if needed.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java