Top "Executorservice" questions

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

ExecutorService awaitTermination gets stuck

I made a fixed size thread pool with Executors.newFixedThreadPool(2), and I executed 10 Runnable objects. I set breakpoints and traced …

java multithreading executorservice java.util.concurrent
Will a ScheduledExecutorService create new threads as needed?

I'm using Executors.newScheduledThreadPool() to create a ScheduledExecutorService, specifying the number of threads like so: int corePoolSize = 42; ScheduledExecutorService foo = Executors.…

java executorservice
Capturing executor for current thread

I'm using ListenableFuture from Guava, and one nice thing about them is that one pass Executor to the Futures.addCallback …

java android guava executorservice
How many AsyncTasks i can run in an single process application

I am using asyncTasks, to load list elements with images (Just followed android's tutorial of efficiently loading bitmaps) In DDMS, …

android android-asynctask executorservice threadpoolexecutor
Is adding tasks to BlockingQueue of ThreadPoolExecutor advisable?

The JavaDoc for ThreadPoolExecutor is unclear on whether it is acceptable to add tasks directly to the BlockingQueue backing the …

java concurrency producer-consumer executorservice blockingqueue
ExecutorService.invokeAll does NOT support collection of runnable task

Wanted to run collection of Runnable task through invokeAll(..) method of ExecutorService. But that's not supported as of now (supports …

java executorservice java.util.concurrent
Arquillian - ClassNotFound on org.jboss.arquillian.core.api.threading.ExecutorService

I'm currently trying to make arquillian works but I have a problem on one of my Unit Test. It fails …

jakarta-ee classnotfoundexception executorservice jboss-arquillian
invokeAll() is not willing to accept a Collection<Callable<T>>

I fail to understand why this code won't compile ExecutorService executor = new ScheduledThreadPoolExecutor(threads); class DocFeeder implements Callable<Boolean&…

java executorservice callable
should ExecutorService be static and global

I want to use the same thread pool throughout my application. To this end, I can make ExecutorService static and …

java multithreading executorservice
ScheduledExecutorService multiple threads in parallel

I'm interested in using ScheduledExecutorService to spawn multiple threads for tasks if task before did not yet finish. For example …

java multithreading executorservice executor