diff options
author | Max Kellermann <max@musicpd.org> | 2020-12-01 16:25:11 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-12-01 17:14:24 +0100 |
commit | 774b4313f2acf2e7880e83c4c53a5b56de6b6869 (patch) | |
tree | 5495b1a9efd1ecacb96d62781fb52eb34ad4a769 /src/storage | |
parent | 1ecbc2ff0f7ab69f734622692288b7efeb1693c8 (diff) |
event/DeferEvent: split the thread-safe version into new class InjectEvent
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/plugins/CurlStorage.cxx | 6 | ||||
-rw-r--r-- | src/storage/plugins/NfsStorage.cxx | 6 | ||||
-rw-r--r-- | src/storage/plugins/UdisksStorage.cxx | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index 5d7292085..05c2a1eb1 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -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); diff --git a/src/storage/plugins/NfsStorage.cxx b/src/storage/plugins/NfsStorage.cxx index fbe18e96b..3afbbcca0 100644 --- a/src/storage/plugins/NfsStorage.cxx +++ b/src/storage/plugins/NfsStorage.cxx @@ -32,7 +32,7 @@ #include "thread/Cond.hxx" #include "event/Loop.hxx" #include "event/Call.hxx" -#include "event/DeferEvent.hxx" +#include "event/InjectEvent.hxx" #include "event/TimerEvent.hxx" #include "util/ASCII.hxx" #include "util/StringCompare.hxx" @@ -61,7 +61,7 @@ class NfsStorage final NfsConnection *connection; - DeferEvent defer_connect; + InjectEvent defer_connect; TimerEvent reconnect_timer; Mutex mutex; @@ -115,7 +115,7 @@ public: reconnect_timer.Schedule(std::chrono::seconds(5)); } - /* DeferEvent callback */ + /* InjectEvent callback */ void OnDeferredConnect() noexcept { if (state == State::INITIAL) Connect(); diff --git a/src/storage/plugins/UdisksStorage.cxx b/src/storage/plugins/UdisksStorage.cxx index 96db3f350..850a11ef0 100644 --- a/src/storage/plugins/UdisksStorage.cxx +++ b/src/storage/plugins/UdisksStorage.cxx @@ -33,7 +33,7 @@ #include "thread/Cond.hxx" #include "thread/SafeSingleton.hxx" #include "event/Call.hxx" -#include "event/DeferEvent.hxx" +#include "event/InjectEvent.hxx" #include "fs/AllocatedPath.hxx" #include "util/StringCompare.hxx" #include "util/RuntimeError.hxx" @@ -62,7 +62,7 @@ class UdisksStorage final : public Storage { std::exception_ptr mount_error; - DeferEvent defer_mount, defer_unmount; + InjectEvent defer_mount, defer_unmount; public: template<typename B, typename I, typename IP> |