Top "Executorservice" questions

ExecutorService is a Java object containing the managed pool of threads and capable of scheduling the submitted tasks for these threads.

Detailed difference between Java8 ForkJoinPool and Executors.newWorkStealingPool?

What is the low-level difference among using: ForkJoinPool = new ForkJoinPool(X); and ExecutorService ex = Executors.neWorkStealingPool(X); Where X is …

multithreading executorservice fork-join executors forkjoinpool
Java ExecutorService callback on thread terminate

I am using cached thread pool ExecutorService to run some asynchronous background tasks. I've provided my ThreadFactory that hands out …

java multithreading threadpool executorservice
Java - Define a timeout for Callable within a ExecutorCompletionService

I've got the following problem using ExecutorCompletionService. I want to call a lot of Callable in different Threads. These Callable …

java multithreading timeout executorservice callable
Is an executor meant to be reused?

Is an executor object meant to be reused after a shutdown? I mean if I call shutdown or shutdownNow after …

java concurrency executorservice java.util.concurrent
Does an ExecutorService get garbage collected when out of scope?

I'm asking this question because I am creating a lot of executor services and while I may already have a …

java multithreading garbage-collection java-8 executorservice
Do we need to shutdown ExecutorService fixedThreadPool

I have created threadpool using ExecutorService, in my application to call vendor websrvice, using below code. ExecutorService executor = Executors.newFixedThreadPool(…

java executorservice threadpoolexecutor
ExecutorService's shutdown() doesn't wait until all threads will be finished

I have a code where 4 threads run at the same time. I want to wait until all these 4 threads will …

java multithreading concurrency executorservice java-threads
Shutdown ExecutorService gracefully in webapp?

In my webapp, I created a service that is using an ExecutorService with fixed size ThreadPool. I reuse the same …

java multithreading tomcat6 executorservice
ExecutorService vs CompletableFuture

I have been trying to implement an asynchronous process, where the parent method calls a child method which would in-turn …

java asynchronous java-8 executorservice completable-future
Using InheritableThreadLocal with ThreadPoolExecutor -- or -- a ThreadPoolExecutor that doesn't reuse threads

I am trying to use both InheritableThreadLocal and a ThreadPoolExecutor. This breaks down because ThreadPoolExecutor reuses threads for each pool (…

java multithreading executorservice