Package java.util.concurrent

Examples of java.util.concurrent.ForkJoinPool.shutdown()


    //ForkJoinPool forkJoinPool = new ForkJoinPool(Runtime.getRuntime().availableProcessors());
    ForkJoinPool forkJoinPool = new ForkJoinPool(5);
    int linkPages = dataLinkPages(issueNo, is_not_full);
    DataLinkThread thread = new DataLinkThread(1,linkPages,issueNo, is_not_full,this);
        Future<List<String>> result = forkJoinPool.submit(thread);
        forkJoinPool.shutdown();
    return result.get();
  }
 
  public List<String> wyDatas(List<String> lottOrderIds) throws InterruptedException, ExecutionException{
    ForkJoinPool forkJoinPool = new ForkJoinPool(5);
View Full Code Here


  public List<String> wyDatas(List<String> lottOrderIds) throws InterruptedException, ExecutionException{
    ForkJoinPool forkJoinPool = new ForkJoinPool(5);
    int size = lottOrderIds.size();
    DataThread thread = new DataThread(0,size-1,lottOrderIds,this);
        Future<List<String>> result = forkJoinPool.submit(thread);
        forkJoinPool.shutdown();
    return result.get();
  }
 
 
  /**
 
View Full Code Here

      ForkJoinPool forkJoinPool = new ForkJoinPool(Runtime.getRuntime().availableProcessors());
      int linkPages = wyService.dataLinkPages("2014043", 3);
      DataLinkThread thread = new DataLinkThread(1,linkPages);
      thread.setTarget(thread);
          Future<List<String>> result = forkJoinPool.submit(thread);
          forkJoinPool.shutdown();
         //System.out.println("ForkJoin:size:"+result.get().size()+" time:"+(System.currentTimeMillis()-b));
    //}
       
  }
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.