Process list of 'N' items with multiple threads
问题 I have List of N items and I want to divide this List in a sequential manner between a fixed number of threads . By sequential I mean, I want to pass 1 to N/4 to first thread , N/4 + 1 to N/2 to second thread and N/2+1 to N to third thread , Now once all the threads have finished their work, I want to notify to main thread to send some message that all the processing has been completed. What I have done so far now is that I have implemented ExecutorService I did something like this