|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Fire-and-forget coroutine type, used as the return type of coroutine route handlers. More...
#include <Task.hpp>
Classes | |
| struct | promise_type |
Public Member Functions | |
| Task (std::coroutine_handle< promise_type > h) | |
Public Attributes | |
| std::coroutine_handle< promise_type > | handle |
Fire-and-forget coroutine type, used as the return type of coroutine route handlers.
An exception that escapes the coroutine never terminates the process. In a handler — a coroutine that takes a std::shared_ptr<ResponseWriter> parameter — it is handled like an exception from a synchronous handler: the router's on_error handler runs, else the client gets a 500. Elsewhere it is logged.
A request the coroutine takes as a parameter (HttpRequest&) stays valid, headers and body included, until the coroutine finishes: across every co_await, and even after the response has been sent.
|
inline |
| std::coroutine_handle<promise_type> orbit::concurrency::Task::handle |