aspose file tools*
The moose likes Threads and Synchronization and the fly likes Multiple Thread Pool Framework - HowTo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Multiple Thread Pool Framework - HowTo" Watch "Multiple Thread Pool Framework - HowTo" New topic
Author

Multiple Thread Pool Framework - HowTo

anieruddha gaikwad
Greenhorn

Joined: Nov 26, 2006
Posts: 13
here are Jobs.
Job contain Different Tasks
Job1
- Task 11
- Task 12
- Task 13
Job2
Task 21
Task 22
Task 23
Job3
Task 31
Task 32
Task 33
Task 34


I am using Executor framework, and running say 3 task in different threads simeltaneoulsly. But right now there is no way to say those 3 threads run task from different job and not from same job. What I want is some kind of framework, where I can put these task in different buckets based on their job. And when thread activate and run the task it should pick task from different job bucket maybe in round-robin fashion.

Each Job having no interdependency with each other. For some job, it is nacessary to run only 1 task at a time. One important things, the task are added to thread pool at runtime.
 
wood burning stoves
 
subject: Multiple Thread Pool Framework - HowTo
 
Similar Threads
Monitoring threads in a pool and evicting hung threads
Why are two diff. Tasks/Threads ending up on the same thread?
parallelism in a for loop and using java 5 concurrency
Executors
Thread Pooling and its implementation