
vuegwt.shaded.org.junit.internal.requests.MemoizingRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vue-gwt-processors Show documentation
Show all versions of vue-gwt-processors Show documentation
Annotation Processors for Vue GWT
The newest version!
package org.junit.internal.requests;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.junit.runner.Request;
import org.junit.runner.Runner;
abstract class MemoizingRequest extends Request {
private final Lock runnerLock = new ReentrantLock();
private volatile Runner runner;
@Override
public final Runner getRunner() {
if (runner == null) {
runnerLock.lock();
try {
if (runner == null) {
runner = createRunner();
}
} finally {
runnerLock.unlock();
}
}
return runner;
}
/** Creates the {@link Runner} to return from {@link #getRunner()}. Called at most once. */
protected abstract Runner createRunner();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy