本文整理了Java中java.util.concurrent.ForkJoinPool.isShutdown()
方法的一些代码示例,展示了ForkJoinPool.isShutdown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ForkJoinPool.isShutdown()
方法的具体详情如下:
包路径:java.util.concurrent.ForkJoinPool
类名称:ForkJoinPool
方法名:isShutdown
[英]Returns true if this pool has been shut down.
[中]如果此池已关闭,则返回true。
代码示例来源:origin: apache/hbase
synchronized void shutDownNow() {
if (pool == null || pool.isShutdown()) {
return;
}
pool.shutdownNow();
}
}
代码示例来源:origin: io.projectreactor.addons/reactor-extra
@Override
public boolean isDisposed() {
return pool.isShutdown();
}
代码示例来源:origin: hank-whu/turbo-rpc
while (!isCloseing) {
if (!isCloseing && !appForkJoinPool.isShutdown()
&& System.currentTimeMillis() - lastRescueTime > RESCUE_PERIOD) {
try {
if (!isCloseing && !appForkJoinPool.isShutdown()
&& System.currentTimeMillis() - lastHeartbeatTime > HEARTBEAT_PERIOD) {
try {
代码示例来源:origin: com.turbo-rpc/turbo-rpc
while (!isCloseing) {
if (!isCloseing && !appForkJoinPool.isShutdown()
&& System.currentTimeMillis() - lastRescueTime > RESCUE_PERIOD) {
try {
if (!isCloseing && !appForkJoinPool.isShutdown()
&& System.currentTimeMillis() - lastHeartbeatTime > HEARTBEAT_PERIOD) {
try {
代码示例来源:origin: PreferredAI/venom
fetcher.start();
long lastRequestTime = 0;
while (!Thread.currentThread().isInterrupted() && !threadPool.isShutdown() && handlerExceptions.isEmpty()) {
try {
final Job job = scheduler.poll(100, TimeUnit.MILLISECONDS);
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public ForkJoinPoolMonitor.Status getStatus() {
final ForkJoinPool fjPool = fjPool();
if (fjPool.isTerminated()) // Returns true if all tasks have completed following shut down.
return ForkJoinPoolMonitor.Status.TERMINATED;
if (fjPool.isTerminating()) // Returns true if the process of termination has commenced but not yet completed.
return ForkJoinPoolMonitor.Status.TERMINATING;
if (fjPool.isShutdown()) // Returns true if this pool has been shut down.
return ForkJoinPoolMonitor.Status.SHUTDOWN;
if (fjPool.isQuiescent()) // Returns true if all worker threads are currently idle.
return ForkJoinPoolMonitor.Status.QUIESCENT;
return ForkJoinPoolMonitor.Status.ACTIVE;
}
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public Status getValue() {
final ForkJoinPool fjPool = fjPool();
if (fjPool.isTerminated()) // Returns true if all tasks have completed following shut down.
return ForkJoinPoolMonitor.Status.TERMINATED;
if (fjPool.isTerminating()) // Returns true if the process of termination has commenced but not yet completed.
return ForkJoinPoolMonitor.Status.TERMINATING;
if (fjPool.isShutdown()) // Returns true if this pool has been shut down.
return ForkJoinPoolMonitor.Status.SHUTDOWN;
if (fjPool.isQuiescent()) // Returns true if all worker threads are currently idle.
return ForkJoinPoolMonitor.Status.QUIESCENT;
return ForkJoinPoolMonitor.Status.ACTIVE;
}
});
内容来源于网络,如有侵权,请联系作者删除!