mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Make tarball cache more interruptible
This commit is contained in:
parent
5dd6c4f062
commit
d0f8a92363
2 changed files with 13 additions and 0 deletions
|
@ -84,6 +84,12 @@ static inline bool getInterrupted()
|
|||
return unix::_isInterrupted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw `Interrupted` exception if the process has been interrupted.
|
||||
*
|
||||
* Call this in long-running loops and between slow operations to terminate
|
||||
* them as needed.
|
||||
*/
|
||||
void inline checkInterrupt()
|
||||
{
|
||||
using namespace unix;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue