diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-08-25 16:03:57 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-08-25 16:03:57 -0700 |
| commit | 98ee8a949ad4bfdfa9bf0411b552a23c923eaff7 (patch) | |
| tree | 84ffd2ba562550286e5327ccb8946076942f0934 /toolsrc/include/vcpkg_GlobalState.h | |
| parent | 34bd87c9fcfb1ac9269c75db96852b64ed754d11 (diff) | |
| download | vcpkg-98ee8a949ad4bfdfa9bf0411b552a23c923eaff7.tar.gz vcpkg-98ee8a949ad4bfdfa9bf0411b552a23c923eaff7.zip | |
[vcpkg] Trap Ctrl-C, enable thread safety for global data structures
Diffstat (limited to 'toolsrc/include/vcpkg_GlobalState.h')
| -rw-r--r-- | toolsrc/include/vcpkg_GlobalState.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg_GlobalState.h index 15b8867f7..8f47fa00f 100644 --- a/toolsrc/include/vcpkg_GlobalState.h +++ b/toolsrc/include/vcpkg_GlobalState.h @@ -1,13 +1,16 @@ #pragma once -#include <vcpkg_Chrono.h> +#include <atomic> + +#include "vcpkg_Chrono.h" +#include "vcpkg_Util.h" namespace vcpkg { struct GlobalState { - static ElapsedTime timer; - static bool debugging; - static bool feature_packages; + static Util::LockGuarded<ElapsedTime> timer; + static std::atomic<bool> debugging; + static std::atomic<bool> feature_packages; }; }
\ No newline at end of file |
