gru_wait_idle_or_exception
if (gru_wait_idle_or_exception(gen) == CBS_IDLE)
ret = gru_wait_idle_or_exception(gen);