java.util.concurrent.ThreadPoolExecutor.isRunning()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中java.util.concurrent.ThreadPoolExecutor.isRunning()方法的一些代码示例,展示了ThreadPoolExecutor.isRunning()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ThreadPoolExecutor.isRunning()方法的具体详情如下:
包路径:java.util.concurrent.ThreadPoolExecutor
类名称:ThreadPoolExecutor
方法名:isRunning

ThreadPoolExecutor.isRunning介绍

[英]State check needed by ScheduledThreadPoolExecutor to enable running tasks during shutdown.
[中]ScheduledThreadPoolExecutor在关机期间启用正在运行的任务所需的状态检查。

代码示例

代码示例来源:origin: robovm/robovm

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: robovm/robovm

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return {@code true} if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: robovm/robovm

for (;;) {
  int c = ctl.get();
  if (isRunning(c) ||
    runStateAtLeast(c, TIDYING) ||
    (runStateOf(c) == SHUTDOWN && ! workQueue.isEmpty()))

代码示例来源:origin: robovm/robovm

c = ctl.get();
if (isRunning(c) && workQueue.offer(command)) {
  int recheck = ctl.get();
  if (! isRunning(recheck) && remove(command))
    reject(command);
  else if (workerCountOf(recheck) == 0)

代码示例来源:origin: ibinti/bugvm

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: MobiVM/robovm

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: com.bugvm/bugvm-rt

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: com.gluonhq/robovm-rt

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: jtulach/bck2brwsr

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: FlexoVM/flexovm

public boolean isShutdown() {
  return ! isRunning(ctl.get());
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return {@code true} if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return {@code true} if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return {@code true} if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return {@code true} if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return {@code true} if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return true if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Returns true if this executor is in the process of terminating
 * after {@link #shutdown} or {@link #shutdownNow} but has not
 * completely terminated.  This method may be useful for
 * debugging. A return of {@code true} reported a sufficient
 * period after shutdown may indicate that submitted tasks have
 * ignored or suppressed interruption, causing this executor not
 * to properly terminate.
 *
 * @return true if terminating but not yet terminated
 */
public boolean isTerminating() {
  int c = ctl.get();
  return ! isRunning(c) && runStateLessThan(c, TERMINATED);
}

相关文章

ThreadPoolExecutor类方法