Index: src/DefaultWebRequest.cpp |
diff --git a/src/DefaultWebRequest.cpp b/src/DefaultWebRequest.cpp |
index 50af59ae9dd74c92f0a150b61dab721dd60ac786..57bc8f2d65eb423caee98d66ee2a649d259960ae 100644 |
--- a/src/DefaultWebRequest.cpp |
+++ b/src/DefaultWebRequest.cpp |
@@ -20,8 +20,8 @@ |
using namespace AdblockPlus; |
-DefaultWebRequest::DefaultWebRequest(std::unique_ptr<DefaultWebRequestSync>&& syncImpl) |
- : syncImpl(std::move(syncImpl)) |
+DefaultWebRequest::DefaultWebRequest(const Scheduler& scheduler, std::unique_ptr<DefaultWebRequestSync>&& syncImpl) |
+ : scheduler(scheduler), syncImpl(std::move(syncImpl)) |
{ |
} |
@@ -33,8 +33,8 @@ DefaultWebRequest::~DefaultWebRequest() |
void DefaultWebRequest::GET(const std::string& url, const HeaderList& requestHeaders, const GetCallback& getCallback) |
{ |
- std::thread([this, url, requestHeaders, getCallback] |
+ scheduler([this, url, requestHeaders, getCallback] |
{ |
getCallback(this->syncImpl->GET(url, requestHeaders)); |
- }).detach(); |
+ }); |
} |