Using Interlocked.Exchange(ref Enum, 1) to prevent re-entrancy [migrated]
- by makerofthings7
What options do I have for pending work that can't acquire a lock via the following sample?
System.Threading.Interlocked.CompareExchange<TrustPointStatusEnum>
(ref tp.TrustPointStatus, TrustPointStatusEnum.NotInitalized,TrustPointStatusEnum.Loading);
Based on my research think I have the following options:
I can use Threading.SpinWait…