HTTPDownloaderCurl: Switch to multi/async API

This commit is contained in:
Stenzek
2023-11-06 20:49:25 +10:00
parent b459a42fb7
commit 5b00ffb6cb
3 changed files with 90 additions and 66 deletions

View File

@ -174,7 +174,11 @@ void HTTPDownloader::WaitForAllRequests()
{
std::unique_lock<std::mutex> lock(m_pending_http_request_lock);
while (!m_pending_http_requests.empty())
{
// Don't burn too much CPU.
Common::Timer::NanoSleep(1000000);
LockedPollRequests(lock);
}
}
void HTTPDownloader::LockedAddRequest(Request* request)