libcopp
2.2.0
|
Functions | |
LIBCOPP_COPP_API coroutine_context * | get_coroutine () LIBCOPP_MACRO_NOEXCEPT |
get current coroutine More... | |
template<typename Tc > | |
LIBCOPP_COPP_API_HEAD_ONLY Tc * | get () |
get current coroutine and try to convert type More... | |
LIBCOPP_COPP_API int | yield (void **priv_data=nullptr) LIBCOPP_MACRO_NOEXCEPT |
yield current coroutine More... | |
LIBCOPP_COPP_API_HEAD_ONLY Tc* this_coroutine::get | ( | ) |
get current coroutine and try to convert type
Definition at line 159 of file coroutine_context.h.
References get_coroutine().
Referenced by task< TCO_MACRO >::await_task().
LIBCOPP_COPP_API coroutine_context * this_coroutine::get_coroutine | ( | ) |
get current coroutine
Definition at line 467 of file coroutine_context.cpp.
References coroutine_context_base::check_flags(), coroutine_context_base::flag_type::EN_CFT_IS_FIBER, and detail::get_this_coroutine_context().
Referenced by CASE_TEST(), get(), my_runner(), test_this_context_rec_runner::operator()(), test_this_context_get_cotoutine_runner::operator()(), coroutine_context::start(), test_this_context_thread_func(), and yield().
LIBCOPP_COPP_API int this_coroutine::yield | ( | void ** | priv_data = nullptr | ) |
yield current coroutine
priv_data | private data, if not nullptr, will get the value from start(priv_data) or resume(priv_data) |
Definition at line 477 of file coroutine_context.cpp.
References COPP_EC_NOT_RUNNING, COPP_LIKELY_IF, get_coroutine(), detail::get_this_coroutine_context(), and coroutine_context::yield().
Referenced by test_this_context_yield_runner::operator()().