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

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

#include <CoRoutine.hpp>

Public Member Functions

ReturnType cancel ()
 Cancels the currently executing CoRoutine and returns the current result. More...
 
ReturnType get ()
 Gets the resulting value of the CoRoutine. More...
 
CoRoutineStatus getStatus ()
 Collects the status of the CoRoutine. More...
 

Member Function Documentation

◆ cancel()

template<typename ReturnType , bool timeOut>
ReturnType DiscordCoreAPI::CoRoutine< ReturnType, timeOut >::cancel ( )
inline
Returns
The final value resulting from the CoRoutine's execution.

Definition at line 224 of file CoRoutine.hpp.

Here is the caller graph for this function:

◆ get()

template<typename ReturnType , bool timeOut>
ReturnType DiscordCoreAPI::CoRoutine< ReturnType, timeOut >::get ( )
inline
Returns
The final value resulting from the CoRoutine's execution.

Definition at line 194 of file CoRoutine.hpp.

◆ getStatus()

template<typename ReturnType , bool timeOut>
CoRoutineStatus DiscordCoreAPI::CoRoutine< ReturnType, timeOut >::getStatus ( )
inline
Returns
CoRoutineStatus The status of the CoRoutine.

Definition at line 181 of file CoRoutine.hpp.

Here is the caller graph for this function:

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