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

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