File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// (c)2016 MindView LLC: see Copyright.txt
33// We make no guarantees that this code is fit for any purpose.
44// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
5+ // {TimeOutDuringTesting} (on single-core machines)
56import java .util .concurrent .*;
67
78public class AtomicityTest implements Runnable {
@@ -27,5 +28,5 @@ public static void main(String[] args) {
2728 }
2829}
2930/* Output:
30- 1
31+ 73
3132*/
Original file line number Diff line number Diff line change 1010 <jrun cls =" ActiveObjectDemo" />
1111 <jrun cls =" AtomicEvenSupplier" failOnError =' false' timeOut =' 4000' msg =' * Timeout for Testing *' />
1212 <jrun cls =" AtomicIntegerTest" />
13- <jrun cls =" AtomicityTest" />
13+ <jrun cls =" AtomicityTest" failOnError = ' false ' timeOut = ' 4000 ' msg = ' * Timeout for Testing * ' />
1414 <jrun cls =" AttemptLocking" />
1515 <jrun cls =" BankTellerSimulation" arguments =" 5" />
1616 <jrun cls =" BasicThreads" />
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ sh registry.sh 3 &
22sleep 1
33sh server.sh 3 &
44sleep 1
5- java DisplayPerfectTime
5+ java DisplayPerfectTime
Original file line number Diff line number Diff line change 11rmiregistry &
22sleep $1
3- killall rmiregistry
3+ killall rmiregistry
You can’t perform that action at this time.
0 commit comments