Skip to content

Commit 0b35f04

Browse files
committed
Fixed incorrect return of the source to the pool
1 parent bac3270 commit 0b35f04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DotNext.Threading/Threading/CancellationTokenMultiplexer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private void ReturnCore(PooledCancellationTokenSource source)
110110
source.Next = current;
111111
tmp = Interlocked.CompareExchange(ref firstInPool, source, current);
112112

113-
if (ReferenceEquals(tmp, source))
113+
if (ReferenceEquals(tmp, current))
114114
break;
115115
}
116116
}

0 commit comments

Comments
 (0)