Skip to content

Commit a7dcf4f

Browse files
committed
lecture
1 parent 6350805 commit a7dcf4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/io/concurrency/chapter11/exam05/ThenApplyExample.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static void main(String[] args) {
1010
CompletableFuture<Integer> asyncFuture = CompletableFuture.supplyAsync(() -> {
1111
System.out.println("thread1:" + Thread.currentThread().getName());
1212
try {
13-
Thread.sleep(1000);
13+
Thread.sleep(500);
1414
} catch (InterruptedException e) {
1515
throw new RuntimeException(e);
1616
}
@@ -35,7 +35,7 @@ static class MyService {
3535

3636
public int getData1(){
3737
try {
38-
Thread.sleep(1000);
38+
Thread.sleep(500);
3939
} catch (InterruptedException e) {
4040
throw new RuntimeException(e);
4141
}
@@ -44,7 +44,7 @@ public int getData1(){
4444

4545
public int getData2(){
4646
try {
47-
Thread.sleep(1000);
47+
Thread.sleep(500);
4848
} catch (InterruptedException e) {
4949
throw new RuntimeException(e);
5050
}

0 commit comments

Comments
 (0)