Skip to content

Commit a3c9183

Browse files
author
Alex Ve
committed
change processing()
1 parent fdcea19 commit a3c9183

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

core-java-8/src/main/java/com/baeldung/forkjoin/CustomRecursiveAction.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
import java.util.List;
66
import java.util.concurrent.ForkJoinTask;
77
import java.util.concurrent.RecursiveAction;
8+
import java.util.logging.Logger;
89

910
public class CustomRecursiveAction extends RecursiveAction {
1011

1112
private String workLoad = "";
12-
1313
private static final int THRESHOLD = 4;
1414

15+
private static Logger logger = Logger.getAnonymousLogger();
16+
1517
public CustomRecursiveAction(String workLoad) {
1618
this.workLoad = workLoad;
1719
}
@@ -41,6 +43,7 @@ private Collection<CustomRecursiveAction> createSubtasks() {
4143
}
4244

4345
private void processing(String work) {
44-
work.toUpperCase();
46+
String result = work.toUpperCase();
47+
logger.info("This result - (" + result + ") - was processed by " + Thread.currentThread().getName());
4548
}
4649
}

0 commit comments

Comments
 (0)