bug fix
authoradash <adash>
Sat, 5 Jan 2008 00:33:45 +0000 (00:33 +0000)
committeradash <adash>
Sat, 5 Jan 2008 00:33:45 +0000 (00:33 +0000)
Robust/src/Tests/Atomic5.java

index bc06b10a2be301a0b3b75f22ab35256bf963829e..6fa23a3462ffa0a1f245ea719e10e86bb1e9849a 100644 (file)
@@ -8,6 +8,7 @@ public class Atomic5 extends Thread {
                
                Integer age;
                String name;
+               Atomic5 tmp;
                Atomic5[] at5;
                atomic {
                        at5 =  global new Atomic5[4];
@@ -36,16 +37,24 @@ public class Atomic5 extends Thread {
                System.printInt(c);
                System.printString("\n");
                System.printString("Starting\n");
+               for(int i = 0 ; i< 4; i++) {
+                       atomic {
+                               tmp = at5[i];
+                       }
+                       tmp.start(mid);
+               }
+               /*
                for(int i = 0 ; i< 4; i++) {
                        at5[i].start(mid);
                }
+               */
                System.printString("Finished\n");
                while(true) {
                        ;
                }
        }
 
-       public int run() {
+       public void run() {
                /*
                String newname = "";
                int ag;
@@ -102,6 +111,6 @@ public class People {
        public boolean isSenior() {
                if(this.getAge() > 65)
                        return true;
-               return false;;
+               return false;
        }
 }