Skip to main content

wait_if_interrupted

Function wait_if_interrupted 

Source
pub fn wait_if_interrupted()
Expand description

Never return once an interrupt has arrived: wait for the cleanup thread to exit the process.

The thread kills the build or the measured command, and the main thread, seeing it fail, would otherwise finish the loop and exit with its own status first — 1 for a range with nothing recorded, where the signal’s 130 or 143 was due — and possibly before the checkout was removed. The main thread calls this after every commit and before it returns, so the exit is always the handler’s.