public sealed class CancellationTokenSource : IDisposable
{
- volatile bool canceled;
- volatile bool processed;
+ bool canceled;
+ bool processed;
int currId = int.MinValue;
}
}
+ Thread.MemoryBarrier ();
processed = true;
if (exceptions != null && exceptions.Count > 0)
sw.SpinOnce ();
}
-
- internal void ThrowIfCancellationRequested ()
- {
- if (canceled)
- throw new OperationCanceledException (CreateToken ());
- }
-
+
CancellationTokenRegistration GetTokenReg ()
{
CancellationTokenRegistration registration