From c8e04c8cd9093b451c8845bbf82473aeb13e1364 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 18 Aug 2014 10:56:09 +0300 Subject: [PATCH] Implement missing future specializations --- reactor.hh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/reactor.hh b/reactor.hh index 59711def46..e9ae6db93f 100644 --- a/reactor.hh +++ b/reactor.hh @@ -409,6 +409,14 @@ promise::get_future() return future(_state); } +inline +future +promise::get_future() +{ + assert(!_state->_future); + return future(_state); +} + using accept_result = std::tuple; struct listen_options { @@ -815,7 +823,12 @@ void future_state::make_ready() { } } - +inline +void future_state::make_ready() { + if (_task) { + the_reactor.add_task(std::move(_task)); + } +} #if 0 future> read_until(size_t limit, const CharType* eol, size_t eol_len);