DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::co_routine< return_type_new, timeOut > Class Template Reference

A co_routine - representing a potentially asynchronous operation/function. More...

#include <CoRoutine.hpp>

Public Types

using return_type = return_type_new
 The return type of this co_routine.
 

Public Member Functions

return_type cancel ()
 Cancels the currently executing co_routine and returns the current result. More...
 
return_type cancelAndWait ()
 Cancels the currently running co_routine, while blocking to wait for it to complete. More...
 
return_type get ()
 Gets the resulting value of the co_routine. More...
 
co_routine_status getStatus ()
 Collects the status of the co_routine. More...
 

Member Function Documentation

◆ cancel()

template<typename return_type_new , bool timeOut>
return_type discord_core_api::co_routine< return_type_new, timeOut >::cancel ( )
inline
Returns
the final value resulting from the co_routine's execution.

Definition at line 244 of file CoRoutine.hpp.

◆ cancelAndWait()

template<typename return_type_new , bool timeOut>
return_type discord_core_api::co_routine< return_type_new, timeOut >::cancelAndWait ( )
inline
Returns
the final value resulting from the co_routine's execution.

Definition at line 217 of file CoRoutine.hpp.

Here is the caller graph for this function:

◆ get()

template<typename return_type_new , bool timeOut>
return_type discord_core_api::co_routine< return_type_new, timeOut >::get ( )
inline
Returns
the final value resulting from the co_routine's execution.

Definition at line 191 of file CoRoutine.hpp.

◆ getStatus()

template<typename return_type_new , bool timeOut>
co_routine_status discord_core_api::co_routine< return_type_new, timeOut >::getStatus ( )
inline
Returns
co_routine_status the status of the co_routine.

Definition at line 178 of file CoRoutine.hpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: