This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
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.
Is your feature request related to a problem? Please describe.
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.