75 |
|
}}); |
76 |
|
|
77 |
|
t.start(); |
78 |
< |
Thread.sleep(SHORT_DELAY_MS); |
78 |
> |
delay(SHORT_DELAY_MS); |
79 |
|
t.interrupt(); |
80 |
|
t.join(); |
81 |
|
} |
91 |
|
}}); |
92 |
|
|
93 |
|
t.start(); |
94 |
< |
Thread.sleep(SHORT_DELAY_MS); |
94 |
> |
delay(SHORT_DELAY_MS); |
95 |
|
t.interrupt(); |
96 |
|
t.join(); |
97 |
|
} |
123 |
|
Thread t2 = new Thread(new CheckedRunnable() { |
124 |
|
public void realRun() throws InterruptedException { |
125 |
|
assertSame(one, e.exchange(two)); |
126 |
< |
Thread.sleep(SMALL_DELAY_MS); |
126 |
> |
delay(SMALL_DELAY_MS); |
127 |
|
assertSame(three, e.exchange(one)); |
128 |
|
}}); |
129 |
|
Thread t3 = new Thread(new CheckedRunnable() { |
130 |
|
public void realRun() throws InterruptedException { |
131 |
< |
Thread.sleep(SMALL_DELAY_MS); |
131 |
> |
delay(SMALL_DELAY_MS); |
132 |
|
assertSame(one, e.exchange(three)); |
133 |
|
}}); |
134 |
|
|
135 |
|
t1.start(); |
136 |
|
t2.start(); |
137 |
|
t3.start(); |
138 |
< |
Thread.sleep(SHORT_DELAY_MS); |
138 |
> |
delay(SHORT_DELAY_MS); |
139 |
|
t1.interrupt(); |
140 |
|
t1.join(); |
141 |
|
t2.join(); |