java - Are tasks parallelized when executed via an ExecutorCompletionService? -


I deposited 5 jobs for one, but it executed in jobs such as looks Goes away. The executable service provided to the creator of the company has been created using the new Cash Flat. Am I doing anything wrong?

UPDATE Every job is basically querying a database & amp; Code has been closed for some calculation executable service. I have just changed the callbones with my own custom callbell implementation.

Expiring Termination Service Anything To do this, how it works, this is an easy way to get the result.

Executor. NewcachedThreadPool works differently by default, threads that can parallel, have been given:

  • The tasks are free, and Do not do this in sync with the same object;
  • You have multiple hardware CPU threads

The last point is worthy of an explanation. Although there is no guarantee, in practice, Sun JVM supports the currently executed thread, so it has never changed in favor of the other one. This means that your 5 tasks can be executed sequentially due to GMM implementation and if not being depressed, a multi-core machine.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -