summaryrefslogtreecommitdiff
path: root/filecache.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-10-04 02:28:48 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-10-04 02:28:48 -0400
commit43f87b4bcaa6d160cf7c4856109af06ea4873cf3 (patch)
tree8b04cd91eb747ddef40ce6e2db2e1efda7ff4ba4 /filecache.hpp
parentbbe36a8246041544d6ebe420dfa1b695b6c74521 (diff)
downloadabaddon-portaudio-43f87b4bcaa6d160cf7c4856109af06ea4873cf3.tar.gz
abaddon-portaudio-43f87b4bcaa6d160cf7c4856109af06ea4873cf3.zip
allow limiting concurrent http requests
add Semaphore update SettingsManager a little
Diffstat (limited to 'filecache.hpp')
-rw-r--r--filecache.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/filecache.hpp b/filecache.hpp
index b54f842..eed355a 100644
--- a/filecache.hpp
+++ b/filecache.hpp
@@ -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;