mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
ThreadPool: On exception, interrupt the other worker threads
This commit is contained in:
parent
6a888ec29a
commit
b7376edf06
4 changed files with 14 additions and 7 deletions
|
@ -1002,6 +1002,7 @@ void closeOnExec(int fd)
|
|||
bool _isInterrupted = false;
|
||||
|
||||
static thread_local bool interruptThrown = false;
|
||||
thread_local std::function<bool()> interruptCheck;
|
||||
|
||||
void setInterruptThrown()
|
||||
{
|
||||
|
@ -1020,7 +1021,6 @@ void _interrupted()
|
|||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue