Fix CancellationTokenRegistration.Token after CTS.Dispose (dotnet/coreclr#21394)
authorStephen Toub <stoub@microsoft.com>
Thu, 6 Dec 2018 18:41:54 +0000 (13:41 -0500)
committerGitHub <noreply@github.com>
Thu, 6 Dec 2018 18:41:54 +0000 (13:41 -0500)
commit3d41ee449aff1146de235a9d04c6d9431f5054a7
tree0d738f723681fed015f562cee72186f73888f4c6
parent52a79f41ce42e36a7ce4eb766bbeedf15d01dc09
Fix CancellationTokenRegistration.Token after CTS.Dispose (dotnet/coreclr#21394)

CTR.Token should never throw, but it's currently throwing an ObjectDisposedException if the associated CancellationTokenSource has been disposed.

Commit migrated from https://github.com/dotnet/coreclr/commit/588faa52bd2269ca3158c2b0c9199b0b9f90ec11
src/coreclr/src/System.Private.CoreLib/src/System/Threading/CancellationTokenRegistration.cs