libcopp  2.2.0
Functions
this_task Namespace Reference

Functions

LIBCOPP_COTASK_API impl::task_implget_task () LIBCOPP_MACRO_NOEXCEPT
 get current running task More...
 
template<typename Tt >
LIBCOPP_COTASK_API_HEAD_ONLY Tt * get ()
 get current running task and try to convert type More...
 

Function Documentation

◆ get()

template<typename Tt >
LIBCOPP_COTASK_API_HEAD_ONLY Tt* this_task::get ( )

get current running task and try to convert type

Returns
current running task or empty pointer when not in task or fail to convert type

Definition at line 23 of file this_task.h.

References get_task().

◆ get_task()

LIBCOPP_COTASK_API impl::task_impl * this_task::get_task ( )

get current running task

Returns
current running task or empty pointer when not in task

Definition at line 9 of file this_task.cpp.

References impl::task_impl::this_task().

Referenced by get(), main(), and test_this_context_get_cotoutine_runner::operator()().