I want to manage a list of Futures objects returned by my TaskExecutor.
I've something like this
List<Future<String>> list
void process(ProcessThis processThis) {
...
|
I'm writing an application that spawns multiple concurrent tasks. I'm using a thread pool to implement that.
It may happen that an event occurs that renders the computations being done in ... |
Well i have the following problem. I want to stress test an application of mine
that is deployed on a Tomcat server. The case i want to test is the following:
a user ... |
What is the best way to run a static method in several threads, using a thread pool?
Also I trying to pass an argument to the static method. something like
Class A{
public ...
|
I would like to create a thread pool which will execute the most recently submitted task. Any advice on how to accomplish this?
Thank you
|
I have strange problem with java ThreadPool
I'm define executorService as follow:
ExecutorService executorService = Executors.newFixedThreadPool(5)
and later submit tasks:
while (!manager.stop()) {
File file = getFile();
if (file ...
|
We have a ThreadPoolExecutor that pulls tasks off a queue for execution. For a given type of object, ex. user, we can have parallel operations occurring across different instances. However, ... |
|
So I create lets say 5 threads, and after their work is completed I'd like to do another work. so how to find out when threads from executor finish their ... |
I am using a ThreadPoolExecutor with a corePoolSize = maxPoolSize = queueSize = 15
Every incoming request spawns 7 tasks, to be executed with this thread pool.
Even though each of the individual ... |
I have a Runnable implementing class which will be run from a Executors.newFixedThreadPool
Inside the Runnable, I have an infinite-loop running which listens on an UDP Port for incoming data.
I want to ... |
I'm using the ExecutorService to process thousands of small independent tasks. Each task, on completion, stores the result (which is either true of false).
So, instead of processing all of the tasks, ... |
I'm using a ConcurrentLinkedQueue to store computational steps, and an ExecutorService created by Executors.newFixedThreadPool to execute them out. My problem is that the application never terminates. Here's some code:
public class Run ...
|
in my application, I have to solve a problem by executing many network-io bound task and sometime one io bound task and be divided into smaller io bound tasks. These tasks ... |
|
Hi All, I am not sure if this problem has been addressed in any of the previous posts. I have implemented a thread pool manager which creates 5 threads and assigns task to these threads. The thread pool manager waits for all threads to finish and also for all tasks to finish before exiting. The task given to the threads consists ... |
Hi All, I am using following code to create a thread pool using java executor framework. public class Executor { private static ExecutorService executor = null; public static void main(String args[]) { executor = Executors.newFixedThreadPool(2); List> resultLlist = new ArrayList>(); Queue activeTasks = null; Future response = null; for(int i=0;i<1;i++) { Callable worker = new Worker(); response = executor.submit(worker); resultLlist.add(response); } ... |
hey, thanks for your reply ... why do we want to do this ... imagine there are 200 sources that pump in tasks ... the requirement is that tasks that come from the same source must not get executed at the same time, tasks from different sources can, though ... so there should be one threadpool with, say, 40 threads that ... |