I have an assignment, I want them to be processed parallel with N threads. I want to wait until all the tasks are finished, store the results, and then run the next N works (and in such a loop).
Which remnants from Java Usage concurrency can help me here?
I looked at I thought, there should be a simpler way to calculate a set of tasks. You can use - it will get you those commands from You will still have a small loop, and the code you want to add will be after the loop after the completion of everything. I think that should be fine. ExecutorService.invokeAll () , but it gives a list of futures, so I should start all of them in a loop until all these Do not get well
future Allows to
No comments:
Post a Comment