Implement APIs for some threading metrics (CoreRT) (dotnet/corert#7066)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Tue, 23 Apr 2019 06:31:37 +0000 (23:31 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 23 Apr 2019 13:24:44 +0000 (06:24 -0700)
commit447b6554f393f3fa02f3d697cdf7c56612a0fa1a
treeb4a83ad036713004f1fcc2bac7c83544a1851a12
parentc0cae0a041549edd759366eb3e732f8348b466b3
Implement APIs for some threading metrics (CoreRT) (dotnet/corert#7066)

* Implement APIs for some threading metrics (CoreRT)

- API review: https://github.com/dotnet/corefx/issues/35500
- May depend on https://github.com/dotnet/coreclr/pull/22754

* Use thread-locals for counting, use finalizer instead of runtime to detect thread exit

* Don't let the count properties throw OOM

* Remove some flushes

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/System.Private.CoreLib/shared/System/Threading/ThreadLocal.cs