Exemple #1
0
 internal override void CompleteAbortingClone(InternalTransaction tx)
 {
     if (tx.phase1Volatiles.VolatileDemux != null)
     {
         tx.phase1Volatiles.dependentClones--;
     }
     else
     {
         tx.abortingDependentCloneCount--;
         if (tx.abortingDependentCloneCount == 0)
         {
             OletxDependentTransaction abortingDependentClone = tx.abortingDependentClone;
             tx.abortingDependentClone = null;
             Monitor.Exit(tx);
             try
             {
                 try
                 {
                     abortingDependentClone.Complete();
                 }
                 finally
                 {
                     abortingDependentClone.Dispose();
                 }
             }
             finally
             {
                 Monitor.Enter(tx);
             }
         }
     }
 }
Exemple #2
0
 internal override void CompleteBlockingClone(InternalTransaction tx)
 {
     if (tx.phase0Volatiles.dependentClones > 0)
     {
         tx.phase0Volatiles.dependentClones--;
         if (tx.phase0Volatiles.preparedVolatileEnlistments == (tx.phase0VolatileWaveCount + tx.phase0Volatiles.dependentClones))
         {
             tx.State.Phase0VolatilePrepareDone(tx);
         }
     }
     else
     {
         tx.phase0WaveDependentCloneCount--;
         if (tx.phase0WaveDependentCloneCount == 0)
         {
             OletxDependentTransaction transaction = tx.phase0WaveDependentClone;
             tx.phase0WaveDependentClone = null;
             Monitor.Exit(tx);
             try
             {
                 try
                 {
                     transaction.Complete();
                 }
                 finally
                 {
                     transaction.Dispose();
                 }
             }
             finally
             {
                 Monitor.Enter(tx);
             }
         }
     }
 }