[cvs] / jsr166 / src / test / tck / AtomicIntegerArrayTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AtomicIntegerArrayTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14, Tue Nov 17 02:37:16 2009 UTC revision 1.15, Tue Nov 17 06:58:50 2009 UTC
# Line 133  Line 133 
133      public void testCompareAndSetInMultipleThreads() throws Exception {      public void testCompareAndSetInMultipleThreads() throws Exception {
134          final AtomicIntegerArray a = new AtomicIntegerArray(1);          final AtomicIntegerArray a = new AtomicIntegerArray(1);
135          a.set(0, 1);          a.set(0, 1);
136          Thread t = new Thread(new Runnable() {          Thread t = new Thread(new CheckedRunnable() {
137                  public void run() {              public void realRun() {
138                      while (!a.compareAndSet(0, 2, 3)) Thread.yield();                  while (!a.compareAndSet(0, 2, 3))
139                        Thread.yield();
140                  }});                  }});
141    
142          t.start();          t.start();

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8