Made quicksort work with multiple threads.