I'm using a thread pool to execute tasks in the background of my application. However, some of my tasks are heavier than others. So I'd like to limit the ...
I'm quite new to executer services. Liked doing everything myself, but I think it's time to trust these services.
I want to hand by Executer a Runnable. The executer wraps that in ...
Are there any implementations of a thread pool (in Java) that ensures all tasks for the same logical ID are executed on the same thread?
The logic I'm after is if there ...
Can you get access to the underlying queue of commands? You could maybe check to see if it's empty. Or if you will be coding all the commands to be executed, you could make them increment a static (global) counter when they start, decrement when they end. Any time the counter is zero then all tasks are done. Make sure the ...
Hello everyone. I have an information question. In my application the user sets the number of threads that should run a certain type of code( task). in my source code there are 2 different type of tasks that needs to be run by the ThreadPool. information saved in a database by the first task is needed in the second task. Task ...
I have a thread pool that I've created to handle some background processing in my app. I have three kinds of tasks that I need to run. 1. Normal task. This works correctly. 2. Paced task. This task can run concurrent with others, but can only run so often. I need it to play nice and not run multiple jobs at ...
Hi, I want to create a fixed size thread pool say of size 100 and i will submit around 200 task to it. Now i want it to serve them infinitely i.e once all tasks are completed re-do them again and again. I want to ask you people that whether this is possible or i have to re-submit them to thread ...
My understanding is that this should create a thread pool that will accept 10 tasks, once there have been 10 tasks submitted I should get RejectedExecutionException, however; I am seeing that when I execute the code the pool accepts 20 execute calls before throwing RejectedExecutionException. I am on Windows 7 using Java 1.6.0_21 Any thoughts on what I am doing incorrectly? ...