A "wait for condition" has been added instead of using a
"while condition, sleep".