[release/6.0] Fix: CTS.TryReset() concurrency issue #60182 (#60323)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 13 Oct 2021 22:48:14 +0000 (18:48 -0400)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 22:48:14 +0000 (18:48 -0400)
commit29dad028278ad8332592960dbe3a3a241f02a500
treefc7c3fd2f06e0c6c057aba4d6ad120b9d335616c
parentecd8922d4d4b66ae5ae23361a6f6ae6106df5dc8
[release/6.0] Fix: CTS.TryReset() concurrency issue #60182 (#60323)

* Quick fix of #60182

* Fixed reset condition when there is no timer

* Simplify branching

Co-authored-by: sakno <roman.sakno@gmail.com>
src/libraries/System.Private.CoreLib/src/System/Threading/CancellationTokenSource.cs