We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f1059d commit 2f45ee7Copy full SHA for 2f45ee7
1 file changed
concurrency/EvenSupplier.java
@@ -3,6 +3,7 @@
3
// We make no guarantees that this code is fit for any purpose.
4
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
5
// When threads collide.
6
+// {TimeOutDuringTesting} (on single-core machines)
7
8
public class EvenSupplier extends IntSupplier {
9
private int currentEvenValue = 0;
@@ -18,9 +19,7 @@ public static void main(String[] args) {
18
19
}
20
/* Output:
21
Press Control-C to exit
-1649 not even!
22
-1657 not even!
23
-1655 not even!
24
-1653 not even!
25
-1651 not even!
+1305 not even!
+1307 not even!
+1303 not even!
26
*/
0 commit comments