Skip to content

Commit da909eb

Browse files
author
mjansson
committed
DivideAndConquer does not have to create the 'second' thread, use 'this' tread, instead of letting 'this' tread wait.
1 parent f6fa973 commit da909eb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/ojalgo/concurrent/DivideAndConquer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ static void call(final ExecutorService executor, final int first, final int limi
8686
int nextWorkers = workers / 2;
8787

8888
Future<?> firstPart = executor.submit(() -> DivideAndConquer.call(executor, first, split, threshold, nextWorkers, conquerer));
89-
Future<?> secondPart = executor.submit(() -> DivideAndConquer.call(executor, split, limit, threshold, nextWorkers, conquerer));
89+
DivideAndConquer.call(executor, split, limit, threshold, nextWorkers, conquerer);
9090

9191
try {
9292
firstPart.get();
93-
secondPart.get();
9493
} catch (final InterruptedException | ExecutionException cause) {
9594
throw new RuntimeException(cause);
9695
}

0 commit comments

Comments
 (0)