Wait for all threads in an Executor to finish?
问题 I'm implementing a parellel quicksort as programming practice, and after I finished, I read the Java tutorial page on Executors, which sound like they could make my code even faster. Unfortunately, I was relying on join()'s to make sure that the program doesn't continue until everything is sorted. Right now I'm using: public static void quicksort(double[] a, int left, int right) { if (right <= left) return; int i = partition(a, left, right); // threads is an AtomicInteger I'm using to make