Reputation: 15
Can anyone let me know how to parallelize for loops using Java 5's JParallelLoops.jar?
Upvotes: 0
Views: 230
Reputation: 88707
JParallelLoops looks like a 3rd party library (http://sourceforge.net/projects/jparallelloops/). From a quick glance at their source code it seems like they have quite some JavaDocs so you might want to start there.
Besides that, just parallelizing loops might not provide the performance gain you'd expect. Maybe you can redesign your code to use thread pools (e.g. using ThreadPoolExecutor
, FutureTask
etc.).
Upvotes: 1