This should be
`if (!totalValid.load(std::memory_order_acquire)) {`