From a6b6148f44add43b90f64639f238201d1ddf1a6c Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Mon, 13 Nov 2017 18:23:04 +0100 Subject: [PATCH] More work on await --- include/continuable/detail/awaiting.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/continuable/detail/awaiting.hpp b/include/continuable/detail/awaiting.hpp index d9b4980..5db87ce 100644 --- a/include/continuable/detail/awaiting.hpp +++ b/include/continuable/detail/awaiting.hpp @@ -49,12 +49,14 @@ using std::experimental::coroutine_handle; /// An object which provides the internal buffer and helper methods /// for waiting on a continuable in a stackless coroutine. template -struct awaitable { +class awaitable { + /// The continuable which is invoked upon suspension Continuable continuable_; + /// A cache which is used to pass the result of the continuation + /// to the + expected::expected cache_; - /// A cache which is used to - // expected::expected cache_; - +public: /// Since continuables are evaluated lazily we are not /// capable to say whether the resumption will be instantly. bool await_ready() const noexcept { @@ -77,6 +79,7 @@ struct awaitable { // return } +private: /// Resolve the continuation through the result template void resolve(Args&&... args) {