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

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

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

ThreadPoolExecutor.runStateLessThan介绍

暂无

代码示例

代码示例来源: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

String rs = (runStateLessThan(c, SHUTDOWN) ? "Running" :
       (runStateAtLeast(c, TERMINATED) ? "Terminated" :
       "Shutting down"));

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

if (runStateLessThan(c, STOP)) {
  if (!completedAbruptly) {
    int min = allowCoreThreadTimeOut ? 0 : corePoolSize;

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

/**
 * Ensures that unless the pool is stopping, the current thread
 * does not have its interrupt set. This requires a double-check
 * of state in case the interrupt was cleared concurrently with a
 * shutdownNow -- if so, the interrupt is re-enabled.
 */
private void clearInterruptsForTaskRun() {
  if (runStateLessThan(ctl.get(), STOP) &&
    Thread.interrupted() &&
    runStateAtLeast(ctl.get(), STOP))
    Thread.currentThread().interrupt();
}

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

/**
 * Ensures that unless the pool is stopping, the current thread
 * does not have its interrupt set. This requires a double-check
 * of state in case the interrupt was cleared concurrently with a
 * shutdownNow -- if so, the interrupt is re-enabled.
 */
private void clearInterruptsForTaskRun() {
  if (runStateLessThan(ctl.get(), STOP) &&
    Thread.interrupted() &&
    runStateAtLeast(ctl.get(), STOP))
    Thread.currentThread().interrupt();
}

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

/**
 * Ensures that unless the pool is stopping, the current thread
 * does not have its interrupt set. This requires a double-check
 * of state in case the interrupt was cleared concurrently with a
 * shutdownNow -- if so, the interrupt is re-enabled.
 */
private void clearInterruptsForTaskRun() {
  if (runStateLessThan(ctl.get(), STOP) &&
    Thread.interrupted() &&
    runStateAtLeast(ctl.get(), STOP))
    Thread.currentThread().interrupt();
}

代码示例来源: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: 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);
}

代码示例来源: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: 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: FlexoVM/flexovm

/**
 * 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: jtulach/bck2brwsr

/**
 * 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: 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: MobiVM/robovm

String rs = (runStateLessThan(c, SHUTDOWN) ? "Running" :
       (runStateAtLeast(c, TERMINATED) ? "Terminated" :
       "Shutting down"));

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

String rs = (runStateLessThan(c, SHUTDOWN) ? "Running" :
       (runStateAtLeast(c, TERMINATED) ? "Terminated" :
       "Shutting down"));

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

if (runStateLessThan(c, STOP)) {
  if (!completedAbruptly) {
    int min = allowCoreThreadTimeOut ? 0 : corePoolSize;

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

if (runStateLessThan(c, STOP)) {
  if (!completedAbruptly) {
    int min = allowCoreThreadTimeOut ? 0 : corePoolSize;

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

if (runStateLessThan(c, STOP)) {
  if (!completedAbruptly) {
    int min = allowCoreThreadTimeOut ? 0 : corePoolSize;

相关文章

ThreadPoolExecutor类方法