title: My multi-threading code doesn't run faster
body: <p>My computer has 8 cores and 64G memory. Is my way of using multi-threading right as below? It processes one line from each document (filePath) and store the result to a list of Document, and finally return.</p>
  
  <p>The problem is that, I didn't see it's running faster when '4' threads are set. The time spent on my testing data is always the same as the time needed by a one-thread run. Any issue with my way of using Callable? </p>
  
  <pre><code>  List&lt;Document&gt; processDocs(String filePath)  {          
            ExecutorService pool = Executors.newFixedThreadPool(4);
            List&lt;Document&gt; processedDocs = new ArrayList&lt;&gt;();
              try {
                  br = new BufferedReader(IOUtils.fileReader(filePath));
  
                  String line = null;
                  int docNo=0;
                  while ((line = br.readLine()) != null) {
                      line = line.trim();
  
                      Callable&lt;Document&gt; callable = new NLPTextThread(line, ++docNo);
                      Future&lt;Document&gt; future = pool.submit(callable);
                      try {
                          processedDocs.add(future.get());
                      } catch (InterruptedException e) {
                          log.error("InterruptedException " + line);
                      } catch (ExecutionException e) {
                          log.error("ExecutionException: " + line);
                          e.printStackTrace();
                      }
                  }
                  pool.shutdown();
  
     return processedDocs;
  }
  </code></pre>
  
  <p>Edited: One more question on the thread safety of the 'docNo' variable. I want to pass the doc serial number to the Callable. In this case, is it thread safe for the "docNo" variable? </p>