[concurrency-interest] Target CPU utilization
gergg at cox.net
Fri Feb 16 13:04:59 EST 2007
Peter Kovacs wrote:
> What if an Executor is not sufficient and I need at least an
> ExecutorService? The edu.emory.mathcs.backport.java.util.concurrent
> does not seem to provide an obvious way to wrapping up an Executor
> instance into an ExecutorService.
I think you just need to decide at what level you want to limit the user's
choice of JVM. If you want to just go with JDK 1.5 and later, you could just
keep your internal operations limited to the use of an ExecutorService
reference, and then allow that type of object to be plugged into your library.
The ThreadPoolExecutor (as an ExecutorService) provides the control that most
would need via ThreadFactory (where do threads come from) and BlockingQueue (how
are they prioritized/related).
If you provide this level of interface, I think that there would be few issues
that other applications could not deal with using as much control as needed.
More information about the Concurrency-interest