multithreading - Implementing multiple queue and single thread in Java -


using java need implement following architecture: there multiple queues jobs continuously coming in queues. there single thread picking jobs queues following scheduling algorithm. should able write own scheduling algorithm. can please tell me java api use implement this? have used threadpoolexecutor, implement single job queue , thread pool containing multiple threads. in advance!

use multiple concurrent queues , 1 semaphore. in producers, push objects , signal semaphore. in 1 consumer, wait on 'common' semaphore , poll queues according scheduling algorithm - 1 of them must have object on it.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -