Add poll_wait to wait_for_result