public boolean interrupted()

in omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/wrapper/TimeoutProb.java [68:91]


  public boolean interrupted() {
    boolean interrupted;
    if (this.thread.isAlive()) {
      // 如果当前线程是活动状态,则发送线程中断信号
      try {
        this.thread.interrupt();
        if(!interruptSent){
          LOG.warn("Thread interrupted on {}ms timeout (over {}ms)",
              new Object[]{System.currentTimeMillis() - this.startTime,
                  this.expireTime - this.startTime}
          );
        }
        interruptSent = true;
      } catch (Exception e) {
        this.interruptFailureException = e;
        LOG.info("Failed to interrupt the thread " + this.thread.getName(), e);
        throw e;
      }
      interrupted = false;
    } else {
      interrupted = true;
    }
    return interrupted;
  }