Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove LRO PollUntilDoneInternal #6173

Open
LarryOsterman opened this issue Nov 4, 2024 · 0 comments
Open

Remove LRO PollUntilDoneInternal #6173

LarryOsterman opened this issue Nov 4, 2024 · 0 comments
Labels
needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team.

Comments

@LarryOsterman
Copy link
Member

Is your feature request related to a problem? Please describe.

  • Every implementation of Azure::Core::Operation implements an almost identical PollUntilDoneInternal function:
      while (true)
      {
        // Poll will update the raw response.
        Poll(context);
        if (IsDone())
        {
          break;
        }
        std::this_thread::sleep_for(period);
      }

      return Azure::Response<Azure::Security::KeyVault::Keys::KeyVaultKey>(
          m_value, std::make_unique<Azure::Core::Http::RawResponse>(*m_rawResponse));
  • The Azure::Core::Operation has separate overloads for APIs with and without a Context parameter rather than providing a defaulted context parameter.

Describe the solution you'd like

  • Move most or all of the implementation of PollUntilDone to Azure::Core::Operation - especially the loop around polling.

  • Add a defaulted Context parameter and remove the redundant method overloads.

@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team.
Projects
None yet
Development

No branches or pull requests

1 participant