소스 검색

fix ZillaRuntime.terminate

tags/2.0.1
Jonathan Cobb 4 년 전
부모
커밋
3bb311f7fa
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -1
      src/main/java/org/cobbzilla/util/daemon/TerminationRequestResult.java
  2. +1
    -1
      src/main/java/org/cobbzilla/util/daemon/ZillaRuntime.java

+ 1
- 1
src/main/java/org/cobbzilla/util/daemon/TerminationRequestResult.java 파일 보기

@@ -2,6 +2,6 @@ package org.cobbzilla.util.daemon;

public enum TerminationRequestResult {

alive, interrupted, terminated;
alive, dead, interrupted, terminated;

}

+ 1
- 1
src/main/java/org/cobbzilla/util/daemon/ZillaRuntime.java 파일 보기

@@ -75,7 +75,7 @@ public class ZillaRuntime {
}

public static TerminationRequestResult terminate(Thread thread, long timeout, Function<Thread, Boolean> onlyIf, boolean verbose) {
if (thread == null || !thread.isAlive()) return TerminationRequestResult.alive;
if (thread == null || !thread.isAlive()) return TerminationRequestResult.dead;
if (onlyIf != null && !onlyIf.apply(thread)) {
if (log.isWarnEnabled()) log.warn("terminate: thread is alive but onlyIf function returned false, not interrupting: " + thread + (verbose ? " with stack " + stacktrace(thread) + "\nfrom: " + stacktrace() : ""));
return TerminationRequestResult.alive;


불러오는 중...
취소
저장