concurrent processing of a queue by N threads
hello there! Could somebody please advice - I need to find some framework, which allows concurrent processing of a queue by N threads. So entire workflow might looks like below:
- create N threads, fetch N objects from queue, pass each object to each thread
- once some thread completes, create new thread, fetch next object from a queue, pass this object tho the thread and start it
so each time there will be N threads processing the queue
also it would be great if there is ability to set some kind of timeout to a thread pool, so if some thread is working longer than specified time - it will be terminated and new thread created, next object fetched from the queue and so on.
- create N threads, fetch N objects from queue, pass each object to each thread
- once some thread completes, create new thread, fetch next object from a queue, pass this object tho the thread and start it
so each time there will be N threads processing the queue
also it would be great if there is ability to set some kind of timeout to a thread pool, so if some thread is working longer than specified time - it will be terminated and new thread created, next object fetched from the queue and so on.
