while (slot != ticket.Value) {
wait.SpinOnce ();
- if (stallTickets != null && stallTickets.TryRemove (ticket.Value))
+ while (stallTickets != null && stallTickets.TryRemove (ticket.Value))
++ticket.Value;
}
} finally {
bool stop = false;
do {
- if (stallTickets != null && stallTickets.TryRemove (ticket.Value))
+ while (stallTickets != null && stallTickets.TryRemove (ticket.Value))
++ticket.Value;
long u = ticket.Users;
} while (!stop && (millisecondsTimeout == -1 || (sw.ElapsedMilliseconds - start) < millisecondsTimeout));
}
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public void Exit ()
{
Exit (false);