Handle early wakeup of counter loop (#57170)
authorJohn Salem <josalem@microsoft.com>
Fri, 13 Aug 2021 21:07:51 +0000 (14:07 -0700)
committerGitHub <noreply@github.com>
Fri, 13 Aug 2021 21:07:51 +0000 (14:07 -0700)
commit3042bd7ae65b92f2968c115c11c8c76bdbd6b336
tree3c726d1fda34759a439bc37a138a64612c64eaff
parentafbb7df61c9533ec854fbffce066baa62d7af3a8
Handle early wakeup of counter loop (#57170)

* Fix #56695
* prevent a negative delta value

* PR feedback + bug fix
* bug fix is preexisting: if a user other than the one who is listening sets the interval to 0 while the counter is enabled, it makes the counter continuously submit values. Changed this so that an interval value of <= 0 results in the counter being disabled

* Add assert after offline conversation
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs