This commit is contained in:
@@ -16,14 +16,6 @@ public class LockFileTestMain {
|
|||||||
boolean shared,
|
boolean shared,
|
||||||
boolean keep
|
boolean keep
|
||||||
) {
|
) {
|
||||||
Thread t = new Thread((Run)() -> {
|
|
||||||
try (AutoCloseable lockfile = LockFile.acquire(lockfilePath, shared)) {
|
|
||||||
while (keep) {
|
|
||||||
Thread.sleep(1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
t.start();
|
|
||||||
try (AutoCloseable lockfile = LockFile.acquire(lockfilePath, shared)) {
|
try (AutoCloseable lockfile = LockFile.acquire(lockfilePath, shared)) {
|
||||||
while (keep) {
|
while (keep) {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user