static void lock(LockFile lockFile, boolean wait, boolean hold) throws FileInUseException {
		if (!lockFile.createLock(wait ? LOCK_TIMEOUT : 0, hold)) {
			String msg = "File is in use - '" + lockFile + "'";
			String user = lockFile.getLockOwner();
			if (user != null) {
				msg += " by " + user;
			}
			throw new FileInUseException(msg);
		}
	}
Obtain a lock on the packed database for reading or writing.
@param lockFile general or update lock file
@param wait if true, block until lock is obtained.
@param hold if true, hold lock until released.
@throws FileInUseException if lock is already active and failed to acquire
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PackedDatabase.java