wait: allow infinite timeout