mirror of https://github.com/axmolengine/axmol.git
Improve code quality
This commit is contained in:
parent
fc768cbd3b
commit
04aa501cde
|
@ -368,6 +368,7 @@ void HttpClient::dispatchResponseCallbacks()
|
|||
return;
|
||||
|
||||
auto lck = _finishedResponseQueue.get_lock();
|
||||
CC_UNUSED(lck);
|
||||
if (!_finishedResponseQueue.unsafe_empty())
|
||||
{
|
||||
HttpResponse* response = _finishedResponseQueue.front();
|
||||
|
@ -419,11 +420,13 @@ void HttpClient::clearResponseQueue() {
|
|||
void HttpClient::clearPendingResponseQueue()
|
||||
{
|
||||
auto lck = _pendingResponseQueue.get_lock();
|
||||
CC_UNUSED(lck);
|
||||
__clearQueueUnsafe(_pendingResponseQueue, ClearResponsePredicate{});
|
||||
}
|
||||
|
||||
void HttpClient::clearFinishedResponseQueue() {
|
||||
auto lck = _finishedResponseQueue.get_lock();
|
||||
CC_UNUSED(lck);
|
||||
__clearQueueUnsafe(_finishedResponseQueue, ClearResponsePredicate{});
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ public:
|
|||
|
||||
/**
|
||||
* Send http request sync, will block caller thread until request finished.
|
||||
* @remark You need call release manually after you don't want use the returned response
|
||||
* @remark Caller must call release manually when the response never been used.
|
||||
*/
|
||||
HttpResponse* sendSync(HttpRequest* request);
|
||||
|
||||
|
|
Loading…
Reference in New Issue