Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for newFixedThreadPool (0.16 sec)

  1. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

      public Crawler(OkHttpClient client) {
        this.client = client;
      }
    
      private void parallelDrainQueue(int threadCount) {
        ExecutorService executor = Executors.newFixedThreadPool(threadCount);
        for (int i = 0; i < threadCount; i++) {
          executor.execute(() -> {
            try {
              drainQueue();
            } catch (Exception e) {
              e.printStackTrace();
            }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 4.6K bytes
    - Viewed (0)
Back to top