@Override
		public void run() {

			synchronized (waitLock) {

				if (abort) {
					terminate();
					return;
				}

				maxLeaseTime -= interval;

				long mt = lockFile.lastModified();
				if (mt != 0L) {

					// Check for updated lock
					if (mt != lastModTime) {

						// Discontinue waiting if we are not trying to create lock
						// Since it is clearly not stuck
						if (!create) {
							terminate();
						}

						// Reset lease timer if we want to create lock
						else {
							maxLeaseTime = maxLockLeasePeriod;
							lastModTime = mt;
							Msg.trace(this, getLockOwner(true) + " grabbed lock before I could: " +
								getLockID());
						}
						return; // lock file still exists
					}

					Msg.trace(this, getLockOwner(true) + " has held lock for " +
						((maxLockLeasePeriod - maxLeaseTime) / 1000) + " seconds: " + getLockID());

					if (maxLeaseTime > 0)
						return;

					// Forcefully remove lock file if max lease time expired
					lockFile.delete();
					Msg.warn(this, "Forcefully removing lock owned by " + getLockOwner(true) +
						": " + getLockID());

					// Delay after forceful removal to avoid race condition!
					// If we create a new lock file immediately, another wait task 
					// could remove it due to the delay between checking the lastModified
					// time and actually removing the file.
					try {
						Thread.sleep(1000);
					}
					catch (InterruptedException e) {
						create = false;
					}

				}

				// Attempt to create lock if requested
				if (create) {
					try {
						if (createLockFileNoWait(false)) {
							Msg.trace(this, (new Date()) + " LockFile: lock granted after wait: " +
								getLockID());
							++lockCount;
							terminate();
						}
						else {
							// create failed - keep waiting
							maxLeaseTime = maxLockLeasePeriod;
							return;
						}
					}
					catch (IOException e) {
						Msg.showError(this, null, "Lock Failure", "Unable to write to lock file: " +
							lockFile.getAbsolutePath(), e);
						terminate();
					}
				}

				lastModTime = 0L;
			}
		}
Check to see if the current lock file has exceeded the
maximum allowed lease time.
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/LockFile.java