Examples of shutdownNow()


Examples of edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.shutdownNow()

            p = executor;
            executor = null;
            classLoader = null;
        }
        if (p != null) {
            p.shutdownNow();
        }
    }

    public void doFail() {
        try {
View Full Code Here

Examples of edu.uci.jforestsx.util.concurrency.BlockingThreadPoolExecutor.shutdownNow()

  }

  public static void shutdown() {
    BlockingThreadPoolExecutor executor = BlockingThreadPoolExecutor.getInstance();
    if (executor != null && !executor.isShutdown()) {
      executor.shutdownNow();
    }
  }

  public EvaluationMetric getEvaluationMetric() {
    return evaluationMetric;
View Full Code Here

Examples of io.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor.shutdownNow()

        }

        // Release all resources
        cb.releaseExternalResources();
        sb.releaseExternalResources();
        eventExecutor.shutdownNow();
    }

    public static void main(String[] args) throws Exception {
        new LocalExampleMultithreaded("1").run();
    }
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

            }
            assertTrue("All channels were succefully connected",successConnecting);    
        }
        finally {
            Util.sleep(2500);
            executor.shutdownNow();
            log.info("closing channels: ");           
            for(JChannel ch:channels) {
                ch.close();                              
                //there are sometimes big delays until entire cluster shuts down
                //use sleep to make a smoother shutdown so we avoid false positives
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

            final Future<JoinTable> future = ex.submit(call);
            final Sequence<? extends Item> mapped;
            try {
                mapped = map(contextSeq, dynEnv, future);
            } catch (InterruptedException e) {
                ex.shutdownNow();
                throw new IllegalStateException(e);
            } catch (ExecutionException e) {
                ex.shutdownNow();
                throw new IllegalStateException(e);
            }
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

                mapped = map(contextSeq, dynEnv, future);
            } catch (InterruptedException e) {
                ex.shutdownNow();
                throw new IllegalStateException(e);
            } catch (ExecutionException e) {
                ex.shutdownNow();
                throw new IllegalStateException(e);
            }
            ex.shutdown(); // REVIEWME is really required?
            return mapped;
        }
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

      });
    }
    synchronized (waitLock) {
      waitLock.notifyAll();
    }
    executorService.shutdownNow();
    assertNull(error.get());
  }

  @Test
  public void testCheckAndPut() throws IOException {
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

        isRunning = false;
      }

    }

    es.shutdownNow();

    try {
      // Wait at most 10 seconds for the remaining tasks to finish
      es.awaitTermination(10, TimeUnit.SECONDS);
    }
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

                e.printStackTrace();
            }

            this.hasCompleted = true;
            this.elapsedTimeNs = System.nanoTime() - start;
            executor.shutdownNow();
            try {
                executor.awaitTermination(3, TimeUnit.SECONDS);
            } catch(InterruptedException e) {}
        } finally {
            tearDown();
View Full Code Here

Examples of java.util.concurrent.ExecutorService.shutdownNow()

        c.sendMessage("foo-1", "hello there");
        c.close();

        Thread.sleep(7000);
        bg.shutdownNow();
        Thread.sleep(1000);

        System.out.printf("\n\n");
        walkFileTree(new File(basePath).toPath(),
                new FileVisitor<Path>() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.