uvco 0.1
|
#include <promise.h>
Public Member Functions | |
PromiseAwaiter_ (PromiseCore_ &core) | |
PromiseAwaiter_ (PromiseAwaiter_ &&)=delete | |
PromiseAwaiter_ (const PromiseAwaiter_ &)=delete | |
PromiseAwaiter_ & | operator= (PromiseAwaiter_ &&)=delete |
PromiseAwaiter_ & | operator= (const PromiseAwaiter_ &)=delete |
~PromiseAwaiter_ ()=default | |
bool | await_ready () const |
bool | await_suspend (std::coroutine_handle<> handle) const |
T | await_resume () const |
Public Attributes | |
PromiseCore_ & | core_ |
Returned as awaiter object when co_await
ing a promise.
Handles suspension of current coroutine and resumption upon fulfillment of the awaited promise.
|
inlineexplicit |
The core
is shared with the promise and contains the resumption handle, and ultimately the returned value. Because the awaiter object is only used while a coroutine is waiting on a co_await suspension point, we can use a reference to the PromiseCore_
object.
|
delete |
|
delete |
|
default |
|
inline |
Part of the coroutine protocol: returns true
if the promise is already fulfilled.
|
inline |
Part of the coroutine protocol: extracts the resulting value from the promise core and returns it.
|
inline |
Part of the coroutine protocol: returns if suspension is desired (always true), and stores the awaiting coroutine state in the PromiseCore
.
|
delete |
|
delete |
PromiseCore_& uvco::Promise< T >::PromiseAwaiter_::core_ |