internal override Enlistment EnlistVolatile(
InternalTransaction tx,
IEnlistmentNotification enlistmentNotification,
EnlistmentOptions enlistmentOptions,
Transaction atomicTransaction
)
{
Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
// Don't get in the way for new volatile enlistments
// Don't hold locks while calling into the promoted tx
Monitor.Exit(tx);
try
{
Enlistment en = new Enlistment(enlistmentNotification, tx, atomicTransaction);
EnlistmentState.EnlistmentStatePromoted.EnterState(en.InternalEnlistment);
en.InternalEnlistment.PromotedEnlistment =
tx.PromotedTransaction.EnlistVolatile(
en.InternalEnlistment, enlistmentOptions);
return en;
}
finally
{
Monitor.Enter(tx);
}
}