GuillaumeGomez / sysinfo

Cross-platform library to fetch system information
MIT License
2.11k stars 316 forks source link

Windows: allow recovering from performance counter errors #1385

Closed kathoum closed 1 week ago

kathoum commented 1 week ago

https://github.com/GuillaumeGomez/sysinfo/issues/1381

If another program is updating the performance counters registry, CPU performance counters cannot be opened because the performance counter registry is in an invalid state.

When it happens, recreate the performance counter query at the next refresh of CPU information, adding a request to reload performance counter information from the registry (without this request, the performance counter library caches the registry data internally).

GuillaumeGomez commented 1 week ago

Nice, thanks!