config-policy: add timeout when waiting on conditional variables