Struct CallbackAwaiter< void >

Synopsis

#include <lib/inc/drogon/utils/coroutine.h>

template <>
struct CallbackAwaiter<void>

Description

No description yet.

Inheritance

Decsendents: TimerAwaiter

Methods

await_ready
await_resume
setException

Source

Lines 461-483 in lib/inc/drogon/utils/coroutine.h.

template <>
struct CallbackAwaiter<void>
{
    bool await_ready() noexcept
    {
        return false;
    }

    void await_resume() noexcept(false)
    {
        if (exception_)
            std::rethrow_exception(exception_);
    }

  private:
    std::exception_ptr exception_{nullptr};

  protected:
    void setException(const std::exception_ptr &e)
    {
        exception_ = e;
    }
};





Add Discussion as Guest

Log in