HTTPDownloader: Remove InternalPollRequests()

CURL uses a worker thread now, so it's no longer needed.
This commit is contained in:
Stenzek
2025-11-29 16:04:47 +10:00
parent e2b3f65134
commit a1162731a0
4 changed files with 2 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
#include "http_downloader.h"
@@ -89,8 +89,6 @@ void HTTPDownloader::LockedPollRequests(std::unique_lock<std::mutex>& lock)
if (m_pending_http_requests.empty())
return;
InternalPollRequests();
const Timer::Value current_time = Timer::GetCurrentValue();
u32 active_requests = 0;
u32 unstarted_requests = 0;

View File

@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
#pragma once
@@ -85,7 +85,6 @@ public:
protected:
virtual Request* InternalCreateRequest() = 0;
virtual void InternalPollRequests() = 0;
virtual bool StartRequest(Request* request) = 0;
virtual void CloseRequest(Request* request) = 0;

View File

@@ -30,7 +30,6 @@ public:
protected:
Request* InternalCreateRequest() override;
void InternalPollRequests() override;
bool StartRequest(HTTPDownloader::Request* request) override;
void CloseRequest(HTTPDownloader::Request* request) override;
@@ -279,11 +278,6 @@ void HTTPDownloaderCurl::ReadMultiResults()
}
}
void HTTPDownloaderCurl::InternalPollRequests()
{
// noop - all handled by worker thread
}
bool HTTPDownloaderCurl::StartRequest(HTTPDownloader::Request* request)
{
Request* req = static_cast<Request*>(request);

View File

@@ -25,7 +25,6 @@ public:
protected:
Request* InternalCreateRequest() override;
void InternalPollRequests() override;
bool StartRequest(HTTPDownloader::Request* request) override;
void CloseRequest(HTTPDownloader::Request* request) override;
@@ -262,11 +261,6 @@ HTTPDownloader::Request* HTTPDownloaderWinHttp::InternalCreateRequest()
return req;
}
void HTTPDownloaderWinHttp::InternalPollRequests()
{
// noop - it uses windows's worker threads
}
bool HTTPDownloaderWinHttp::StartRequest(HTTPDownloader::Request* request)
{
Request* req = static_cast<Request*>(request);