aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libutil/util.cc2
-rw-r--r--src/libutil/util.hh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 5468d1ed1..defb77a10 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1205,7 +1205,7 @@ void closeOnExec(int fd)
//////////////////////////////////////////////////////////////////////
-bool _isInterrupted = false;
+std::atomic<bool> _isInterrupted = false;
static thread_local bool interruptThrown = false;
thread_local std::function<bool()> interruptCheck;
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 708e01cf8..0bdb37a79 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -337,7 +337,7 @@ void closeOnExec(int fd);
/* User interruption. */
-extern bool _isInterrupted;
+extern std::atomic<bool> _isInterrupted;
extern thread_local std::function<bool()> interruptCheck;