event/DeferredCall: rename to DeferEvent

This commit is contained in:
Max Kellermann 2017-09-21 22:40:25 +02:00
parent 18c4ef09d5
commit 9df4853e23
3 changed files with 10 additions and 10 deletions

View File

@ -520,7 +520,7 @@ libevent_a_SOURCES = \
src/event/TimerEvent.hxx src/event/TimerEvent.cxx \ src/event/TimerEvent.hxx src/event/TimerEvent.cxx \
src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \ src/event/IdleMonitor.hxx src/event/IdleMonitor.cxx \
src/event/DeferredMonitor.hxx src/event/DeferredMonitor.cxx \ src/event/DeferredMonitor.hxx src/event/DeferredMonitor.cxx \
src/event/DeferredCall.hxx \ src/event/DeferEvent.hxx \
src/event/MaskMonitor.hxx src/event/MaskMonitor.cxx \ src/event/MaskMonitor.hxx src/event/MaskMonitor.cxx \
src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \ src/event/SocketMonitor.cxx src/event/SocketMonitor.hxx \
src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \ src/event/BufferedSocket.cxx src/event/BufferedSocket.hxx \

View File

@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MPD_EVENT_DEFERRED_CALL_HXX #ifndef MPD_DEFER_EVENT_HXX
#define MPD_EVENT_DEFERRED_CALL_HXX #define MPD_DEFER_EVENT_HXX
#include "check.h" #include "check.h"
#include "DeferredMonitor.hxx" #include "DeferredMonitor.hxx"
@ -29,19 +29,19 @@
* *
* This class is thread-safe. * This class is thread-safe.
*/ */
class DeferredCall final : DeferredMonitor { class DeferEvent final : DeferredMonitor {
typedef BoundMethod<void()> Callback; typedef BoundMethod<void()> Callback;
const Callback callback; const Callback callback;
public: public:
DeferredCall(EventLoop &_loop, Callback _callback) DeferEvent(EventLoop &_loop, Callback _callback)
:DeferredMonitor(_loop), callback(_callback) {} :DeferredMonitor(_loop), callback(_callback) {}
using DeferredMonitor::GetEventLoop; using DeferredMonitor::GetEventLoop;
using DeferredMonitor::Schedule; using DeferredMonitor::Schedule;
using DeferredMonitor::Cancel; using DeferredMonitor::Cancel;
protected: private:
void RunDeferred() override { void RunDeferred() override {
callback(); callback();
} }

View File

@ -21,7 +21,7 @@
#define MPD_ASYNC_INPUT_STREAM_HXX #define MPD_ASYNC_INPUT_STREAM_HXX
#include "InputStream.hxx" #include "InputStream.hxx"
#include "event/DeferredCall.hxx" #include "event/DeferEvent.hxx"
#include "util/HugeAllocator.hxx" #include "util/HugeAllocator.hxx"
#include "util/CircularBuffer.hxx" #include "util/CircularBuffer.hxx"
@ -38,8 +38,8 @@ class AsyncInputStream : public InputStream {
NONE, SCHEDULED, PENDING NONE, SCHEDULED, PENDING
}; };
DeferredCall deferred_resume; DeferEvent deferred_resume;
DeferredCall deferred_seek; DeferEvent deferred_seek;
HugeArray<uint8_t> allocation; HugeArray<uint8_t> allocation;
@ -167,7 +167,7 @@ protected:
private: private:
void Resume(); void Resume();
/* for DeferredCall */ /* for DeferEvent */
void DeferredResume() noexcept; void DeferredResume() noexcept;
void DeferredSeek() noexcept; void DeferredSeek() noexcept;
}; };