ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/AtomicLongArrayTest.java
(Generate patch)

Comparing jsr166/src/test/tck/AtomicLongArrayTest.java (file contents):
Revision 1.13 by jsr166, Tue Nov 17 02:48:16 2009 UTC vs.
Revision 1.14 by jsr166, Tue Nov 17 06:58:50 2009 UTC

# Line 131 | Line 131 | public class AtomicLongArrayTest extends
131      public void testCompareAndSetInMultipleThreads() throws InterruptedException {
132          final AtomicLongArray a = new AtomicLongArray(1);
133          a.set(0, 1);
134 <        Thread t = new Thread(new Runnable() {
135 <                public void run() {
136 <                    while (!a.compareAndSet(0, 2, 3)) Thread.yield();
137 <                }});
134 >        Thread t = new Thread(new CheckedRunnable() {
135 >            public void realRun() {
136 >                while (!a.compareAndSet(0, 2, 3))
137 >                    Thread.yield();
138 >            }});
139  
140          t.start();
141          assertTrue(a.compareAndSet(0, 1, 2));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines