event/DeferEvent: split the thread-safe version into new class InjectEvent

This commit is contained in:
Max Kellermann
2020-12-01 16:25:11 +01:00
parent 1ecbc2ff0f
commit 774b4313f2
22 changed files with 226 additions and 68 deletions

View File

@@ -31,7 +31,7 @@
#include "lib/curl/Escape.hxx"
#include "lib/expat/ExpatParser.hxx"
#include "fs/Traits.hxx"
#include "event/DeferEvent.hxx"
#include "event/InjectEvent.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "time/Parser.hxx"
@@ -84,7 +84,7 @@ CurlStorage::MapToRelativeUTF8(std::string_view uri_utf8) const noexcept
}
class BlockingHttpRequest : protected CurlResponseHandler {
DeferEvent defer_start;
InjectEvent defer_start;
std::exception_ptr postponed_error;
@@ -136,7 +136,7 @@ protected:
}
private:
/* DeferEvent callback */
/* InjectEvent callback */
void OnDeferredStart() noexcept {
assert(!done);