Skip to content

Commit 2f45ee7

Browse files
author
Bruce Eckel
committed
Attempt to fix with {TimeoutDuringTesting}
1 parent 5f1059d commit 2f45ee7

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

concurrency/EvenSupplier.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// When threads collide.
6+
// {TimeOutDuringTesting} (on single-core machines)
67

78
public class EvenSupplier extends IntSupplier {
89
private int currentEvenValue = 0;
@@ -18,9 +19,7 @@ public static void main(String[] args) {
1819
}
1920
/* Output:
2021
Press Control-C to exit
21-
1649 not even!
22-
1657 not even!
23-
1655 not even!
24-
1653 not even!
25-
1651 not even!
22+
1305 not even!
23+
1307 not even!
24+
1303 not even!
2625
*/

0 commit comments

Comments
 (0)