Add swrod::detail::waitFor utility function