Azure / Azure/azure-sdk-for-cpp

Remove LRO PollUntilDoneInternal

Open
#6,173 0 comments 0 reactions 0 assignees View on GitHub
Azure.Core needs-team-triage
Dominant language
C++
Stars
205
Forks
172
Avg merge
1d 3h
Merged PRs (30d)
37

Description

**Is your feature request related to a problem? Please describe.**
* Every implementation of Azure::Core::Operation implements an almost identical PollUntilDoneInternal function:

```cpp
while (true)
{
// Poll will update the raw response.
Poll(context);
if (IsDone())
{
break;
}
std::this_thread::sleep_for(period);
}

return Azure::Response(
m_value, std::make_unique(*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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.