Loop needed to give other threads a change to lock the NSCondition