Namespaces | |
| namespace | detail |
Classes | |
| class | async |
| struct | coro_deleter |
| If the given promise object has an associated coroutine, destroy it. More... | |
| class | generator |
| struct | remove_rvalue_reference |
| struct | remove_rvalue_reference< T && > |
| class | task |
Task that produces a value of type T: to get that value, simply await the task. More... | |
| struct | void_type |
Concepts | |
| concept | specialization_of |
| concept | awaiter |
| concept | awaiter_of |
| concept | awaitable |
| concept | awaitable_of |
| concept | task_value_type |
| concept | sync_notification_type |
Type that supports the notify_awaitable_completed() member function used by mp_coro::detail::synchronized_task. | |
Typedefs | |
| template<typename T > | |
| using | nonvoid_await_result_t = std::conditional_t< std::is_void_v< await_result_t< T > >, void_type, await_result_t< T > > |
| template<typename T > | |
| using | remove_rvalue_reference_t = typename remove_rvalue_reference< T >::type |
| template<typename T > | |
| using | promise_ptr = std::unique_ptr< T, coro_deleter > |
| RAII wrapper that destroys promise object's associated coroutine. More... | |
| template<awaitable A> | |
| using | awaiter_for_t = decltype(detail::get_awaiter(std::declval< A >())) |
| template<awaitable A> | |
| using | await_result_t = decltype(std::declval< awaiter_for_t< A > >().await_resume()) |
Functions | |
| template<typename F > | |
| async (F) -> async< F > | |
| template<awaitable A> | |
| decltype(auto) | sync_await (A &&awaitable) |
| Creates a synchronized task from the awaitable, starts it, and waits for it to complete, returning the result. More... | |
| template<awaitable... Awaitables> | |
| awaitable auto | when_all (Awaitables &&...awaitables) |
| template<std::ranges::range R> | |
| awaitable auto | when_all (R &&awaitables) |
| struct mp_coro::remove_rvalue_reference |
| struct mp_coro::remove_rvalue_reference< T && > |
| struct mp_coro::void_type |
Collaboration diagram for void_type:| using nonvoid_await_result_t = std::conditional_t<std::is_void_v<await_result_t<T> >, void_type, await_result_t<T> > |
Definition at line 33 of file nonvoid_storage.h.
| using remove_rvalue_reference_t = typename remove_rvalue_reference<T>::type |
Definition at line 53 of file bits/type_traits.h.
| using promise_ptr = std::unique_ptr<T, coro_deleter> |
RAII wrapper that destroys promise object's associated coroutine.
Definition at line 44 of file coro_ptr.h.
| using awaiter_for_t = decltype(detail::get_awaiter(std::declval<A>())) |
Definition at line 32 of file type_traits.h.
| using await_result_t = decltype(std::declval<awaiter_for_t<A> >().await_resume()) |
Definition at line 35 of file type_traits.h.
| decltype(auto) sync_await | ( | A && | awaitable | ) |
Creates a synchronized task from the awaitable, starts it, and waits for it to complete, returning the result.
Uses a std::binary_semaphore for waiting and synchronization.
Definition at line 36 of file sync_await.h.
| awaitable auto when_all | ( | Awaitables &&... | awaitables | ) |
Definition at line 165 of file when_all.h.
| awaitable auto when_all | ( | R && | awaitables | ) |
Definition at line 173 of file when_all.h.