mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
allow limiting concurrent http requests
add Semaphore update SettingsManager a little
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include "util.hpp"
|
||||
|
||||
// todo throttle requests and keep track of active requests to stop redundant requests
|
||||
|
||||
@@ -23,6 +24,8 @@ private:
|
||||
void RespondFromPath(std::filesystem::path path, callback_type cb);
|
||||
void OnResponse(const cpr::Response &r);
|
||||
|
||||
std::unique_ptr<Semaphore> m_semaphore;
|
||||
|
||||
std::unordered_map<std::string, std::vector<callback_type>> m_callbacks;
|
||||
std::vector<std::future<void>> m_futures;
|
||||
std::filesystem::path m_tmp_path;
|
||||
|
||||
Reference in New Issue
Block a user