diff --git a/core/reactor.hh b/core/reactor.hh index 0501c77802..855add3a58 100644 --- a/core/reactor.hh +++ b/core/reactor.hh @@ -93,6 +93,8 @@ private: bool _queued = false; bool _expired = false; public: + timer() = default; + explicit timer(callback_t&& callback); ~timer(); future<> expired(); void set_callback(callback_t&& callback); @@ -1443,6 +1445,11 @@ future pollable_fd::sendto(socket_address addr, const void* buf, size_t }); } +template +inline +timer::timer(callback_t&& callback) : _callback(std::move(callback)) { +} + template inline timer::~timer() {