Java Thread Management

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

+4
source share
2 answers

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

+5
source

I think Executor can help you.

+5
source

Source: https://habr.com/ru/post/1399536/


All Articles