|
StripeKit 0.1.1
Stripe integration toolkit for C++
|
Coroutine promise type. More...
#include <Async.h>
Public Member Functions | |
| Task | get_return_object () |
| Creates the task object handed back to the caller. | |
| std::suspend_always | initial_suspend () noexcept |
| Suspends the coroutine at its start so the caller controls when it runs. | |
| auto | final_suspend () noexcept |
| Wakes anything waiting on this task once it finishes. | |
| void | return_value (TResult value) |
| Stores the value the coroutine returned. | |
| void | unhandled_exception () |
| Captures an escaping exception so it can be rethrown to the waiter. | |
Public Attributes | |
| std::optional< TResult > | result |
| The produced value, once available. | |
| std::exception_ptr | error |
| The exception that escaped, if one did. | |
| std::mutex | mutex |
| Guards the fields below. | |
| std::condition_variable | ready |
| Signalled when the coroutine finishes. | |
| std::coroutine_handle | continuation |
| Coroutine waiting on this task. | |
| bool | started = false |
| True once the coroutine has been resumed. | |
| bool | completed = false |
| True once the coroutine has finished. | |
Coroutine promise type.
Used by the compiler; not called directly.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
| std::optional<TResult> stripekit::Task< TResult >::promise_type::result |
| std::exception_ptr stripekit::Task< TResult >::promise_type::error |
| std::mutex stripekit::Task< TResult >::promise_type::mutex |
| std::condition_variable stripekit::Task< TResult >::promise_type::ready |
| std::coroutine_handle stripekit::Task< TResult >::promise_type::continuation |
| bool stripekit::Task< TResult >::promise_type::started = false |
| bool stripekit::Task< TResult >::promise_type::completed = false |