*** empty log message ***
[IRC.git] / Robust / Transactions / dstm2 / src / dstm2 / manager / AggressiveManager.java
index a326c300cfe3463cba898878812118d7f8a152bc..43813c0a6ac0f16706f77b85ce855d7762c757cb 100644 (file)
@@ -35,6 +35,7 @@ package dstm2.manager;
 import dstm2.util.Random;
 import dstm2.ContentionManager;
 import dstm2.Transaction;
+import dstm2.Thread;
 import java.util.Collection;
 
 /**
@@ -45,14 +46,21 @@ public class AggressiveManager extends BaseManager {
   
   public AggressiveManager() {
   }
+  
   public void resolveConflict(Transaction me, Transaction other) {
-      other.abort();   
+      if (other.isActive() && other != me) {
+               other.abort();  
+       }
   }
   
     @Override
   public void resolveConflict(Transaction me, Collection<Transaction> others) {
-      for (Transaction other: others)
-        other.abort(); 
+      for (Transaction other: others){
+          if (other.isActive() && other != me) 
+                other.abort();
+      }
+      
+              
   }