microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.54k stars 1.39k forks source link

Use atomic functions to ensure single initialization of tracking catalog #4592

Closed JohnMcPMS closed 3 days ago

JohnMcPMS commented 3 days ago

Fixes #4587

Change

Hold the tracking catalog object in a shared_ptr and use the atomic functions to ensure that only one thread can initialize it.

Microsoft Reviewers: Open in CodeFlow