hi All, I have a sort of complex problem like below. - we have a real time system with large number threads requirement. In order to optimize the performance, we are thinking of following design.
- create a thread pool executor with max number of threads
- each thread is used to create scheduled executor service.
now the tasks are being assigned to these executor services evenly based on load
BUT the biggest problem is, if one of the task in the queue contains a sleep (for few secs), it blocks the corresponding Schedule executor service thread for that duration and subsequently all the following tasks in that queue.
In this regard, please suggest me how to suspend the execution of the task with sleep OR overriding the sleep somehow and rejoin/schedule the task again to the queue.
Thanks in advance Seshu