import dstm2.util.Random;
import dstm2.ContentionManager;
import dstm2.Transaction;
+import dstm2.Thread;
import java.util.Collection;
/**
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();
+ }
+
+
}