1
0
Fork 0
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:
Robert Hensing 2024-08-26 11:38:40 +02:00
parent 5dd6c4f062
commit d0f8a92363
2 changed files with 13 additions and 0 deletions

View file

@ -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;