| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
dpp::detail::job::promise< Args > Struct Template Reference

Coroutine promise type for a job. More...

`#include <job.h>`

Inheritance diagram for dpp::detail::job::promise< Args >:
[legend]

## Public Member Functions

std_coroutine::suspend_never | final_suspend () const noexcept
| Function called when the job is done.
dpp::job | get_return_object () const noexcept
| Function called to get the job object.
std_coroutine::suspend_never | initial_suspend () const noexcept
| Function called when the job is started.
void | return_void () const noexcept
| Function called when the job returns. Does nothing.
void | unhandled_exception () const
| Function called when an exception is thrown and not caught.

## Detailed Description

template<typename... Args>
struct dpp::detail::job::promise< Args >

Coroutine promise type for a job.

## Member Function Documentation

## ◆ final_suspend()

template<typename... Args>

std_coroutine::suspend_never dpp::detail::job::promise< Args >::final_suspend | ( |  | ) | const

inline noexcept

Function called when the job is done.

Returns
  std::suspend_never Do not suspend at the end, destroying the handle immediately

## ◆ get_return_object()

template<typename... Args>

dpp::job dpp::detail::job::promise< Args >::get_return_object | ( |  | ) | const

inline noexcept

Function called to get the job object.

Returns
  job

## ◆ initial_suspend()

template<typename... Args>

std_coroutine::suspend_never dpp::detail::job::promise< Args >::initial_suspend | ( |  | ) | const

inline noexcept

Function called when the job is started.

Returns
  std::suspend_never Do not suspend at the start, starting the job immediately

## ◆ return_void()

template<typename... Args>

void dpp::detail::job::promise< Args >::return_void | ( |  | ) | const

inline noexcept

Function called when the job returns. Does nothing.

## ◆ unhandled_exception()

template<typename... Args>

void dpp::detail::job::promise< Args >::unhandled_exception | ( |  | ) | const

inline

Function called when an exception is thrown and not caught.

Exceptions

  Immediately | rethrows the exception to the caller / resumer

D++ Library version 9.0.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0