|
template<typename... As> |
| await_coroutine (std::shared_ptr< threadpool > &&t, std::shared_ptr< scheduler > &&s, As &&... as) |
|
virtual void | run () |
| Execute until thunk completes or yield() is called. More...
|
|
template<typename THUNK > |
| coroutine (THUNK &&th) |
| construct a coroutine from a thunk
|
|
template<typename StackAllocator , typename THUNK > |
| coroutine (StackAllocator &&sa, THUNK &&th) |
| construct a coroutine from a stack allocator and thunk
|
|
| coroutine (const coroutine &source)=delete |
|
| coroutine (coroutine &&rhs) noexcept |
| Move Constructor.
|
|
coroutine & | operator= (const coroutine &rhs)=delete |
|
coroutine & | operator= (coroutine &&rhs) noexcept |
| Move Assignment.
|
|
void | yield () |
| Pause execution and return to run() caller. More...
|
|
bool | complete () |
| Returns true if thunk is complete, else false since the coroutine yielded early.
|
|
|
template<typename... As> |
static std::unique_ptr< coroutine > | make (std::shared_ptr< threadpool > &&t, std::shared_ptr< scheduler > &&s, As &&... as) |
|
template<typename Callable , typename... As> |
static std::unique_ptr< coroutine > | make (Callable &&cb, As &&... as) |
| construct an allocated coroutine from a Callable and arguments More...
|
|
◆ run()
virtual void mce::detail::await_coroutine::run |
( |
| ) |
|
|
inlinevirtual |
Execute until thunk completes or yield() is called.
Execute until thunk completes or yield() is called. If thunk is complete run() returns immediately.
This operation is virtual to allow for code injection at run() call.
Reimplemented from mce::coroutine.
The documentation for this struct was generated from the following file: