/// <summary> /// Mark the transaction as finished when the results of /// the transaction have been received. Do not call this /// method in any other occasion. /// </summary> protected void Finish() { if (Status == KmodTransactionStatus.Executing) { Status = KmodTransactionStatus.Finished; } }
public void CancelTransaction(KmodTransaction transaction) { KmodTransactionStatus prevStatus = transaction.Status; transaction.Status = KmodTransactionStatus.Finished; transaction.Ex = new Exception("transaction cancelled"); // Cancel a queued transaction. if (prevStatus == KmodTransactionStatus.Queued) { m_transactionQueue.Remove(transaction); } // Cancel an executing transaction. We have to stop KMOD since the // transaction is under way. else if (prevStatus == KmodTransactionStatus.Executing) { Debug.Assert(transaction == m_curTransaction); EndCurrentTransaction(); StopKmodThread(); RequestRun(); } }
/// <summary> /// Mark the transaction as finished when the results of /// the transaction have been received. Do not call this /// method in any other occasion. /// </summary> protected void Finish() { if (Status == KmodTransactionStatus.Executing) Status = KmodTransactionStatus.Finished; }