We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5fe8be commit 38a2acfCopy full SHA for 38a2acf
src/DotNext.Threading/Threading/LinkedCancellationTokenSource.cs
@@ -101,8 +101,8 @@ private protected set
101
/// </summary>
102
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
103
internal bool IsRootCause => CanInlineToken
104
- ? ReferenceEquals(this, Volatile.Read(in cancellationOrigin.Item1))
105
- : CancellationOrigin == Token;
+ ? Volatile.Read(in cancellationOrigin.Item1) is not { } tokenCopy || ReferenceEquals(this, tokenCopy)
+ : Token == CancellationOrigin;
106
107
// This property checks whether the reinterpret cast CancellationToken => CancellationTokenSource
108
// is safe. If not, just box the token.
0 commit comments