i am trying to do an application,like if there are 10 separate tasks and 4 threads are running.My application has to maintain two queue one for tasks and another for threads.If any task needs to execute it should find which thread is free and assign the task to that thread.i dont know how to produce this.Anyone knows what are the concepts i have to look,please help me.
Share
It sounds like you just need a thread pool of the kind returned by
Executors.newFixedThreadPool. Just submit the tasks to the thread pool when you need to, and it will be executed accordingly.