Condition Variable Spurious Wakeup

Why must condition variable waits always be used with a while loop checking a predicate rather than an if statement?

// Bad
if (!predicate) cv.wait(lock);

// Good
while (!predicate) cv.wait(lock);
A

To satisfy the C++ standard requirements

B

To prevent deadlock

C

To handle spurious wakeups

D

To improve performance