Skip to content

Commit 47f5394

Browse files
author
Wagner Franchin
committed
improved ForkJoinRecursiveActionDemo
1 parent 4be8b88 commit 47f5394

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ForkJoinRecursiveActionDemo.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ protected void compute() {
3939
int mid = (start + end) / 2;
4040
RecursiveReplace left = new RecursiveReplace(start, mid);
4141
RecursiveReplace right = new RecursiveReplace(mid + 1, end);
42-
left.fork();
43-
right.fork();
44-
left.join();
45-
right.join();
42+
invokeAll(left, right);
4643
}
4744
}
4845
}

0 commit comments

Comments
 (0)