mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-30 01:26:15 +02:00
Fix a minor data race with _isInterrupted
This commit is contained in:
parent
884674a8e2
commit
2970ca18bf
2 changed files with 2 additions and 2 deletions
|
@ -1205,7 +1205,7 @@ void closeOnExec(int fd)
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
bool _isInterrupted = false;
|
std::atomic<bool> _isInterrupted = false;
|
||||||
|
|
||||||
static thread_local bool interruptThrown = false;
|
static thread_local bool interruptThrown = false;
|
||||||
thread_local std::function<bool()> interruptCheck;
|
thread_local std::function<bool()> interruptCheck;
|
||||||
|
|
|
@ -337,7 +337,7 @@ void closeOnExec(int fd);
|
||||||
|
|
||||||
/* User interruption. */
|
/* User interruption. */
|
||||||
|
|
||||||
extern bool _isInterrupted;
|
extern std::atomic<bool> _isInterrupted;
|
||||||
|
|
||||||
extern thread_local std::function<bool()> interruptCheck;
|
extern thread_local std::function<bool()> interruptCheck;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue