MXS-2468 Allow an http::Async object to be reset
This commit is contained in:
@ -175,7 +175,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defalt constructor creates an asynchronous operation whose status is ERROR.
|
* Defalt constructor creates an asynchronous operation whose status is READY.
|
||||||
*/
|
*/
|
||||||
Async();
|
Async();
|
||||||
|
|
||||||
@ -204,6 +204,11 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the instance so that it becomes as if it would have been default constructed.
|
||||||
|
*/
|
||||||
|
void reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the status of the operation.
|
* Return the status of the operation.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -491,6 +491,11 @@ Async::Async()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Async::reset()
|
||||||
|
{
|
||||||
|
m_sImp = std::make_shared<ReadyImp>();
|
||||||
|
}
|
||||||
|
|
||||||
Async get_async(const std::vector<std::string>& urls,
|
Async get_async(const std::vector<std::string>& urls,
|
||||||
const Config& config)
|
const Config& config)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user