Search code examples
javamultithreadingprocessor

Java Thread Management


I have been looking for an architecture where my processor contains a set number of threads, say 10 or 20, and each thread has its own processing queue. The processor will select a thread on the basis of availability. How can I implement such a model, any idea?


Solution

  • look up Executors.newFixedThreadPool(10). For each of the threads, you can also set a priority value.