|
Uni20
Asynchronous tensor and runtime library.
|
Awaitable that waits for all provided awaiters to complete. More...
#include <awaiters.hpp>
Public Member Functions | |
| bool | await_ready () noexcept |
| Check if all awaiters are ready. | |
| auto | await_resume () |
| Resume all awaiters and collect their results. | |
| void | await_suspend (TaskFactory f) noexcept |
| Suspend the coroutine on awaiters not yet ready. | |
| int | num_awaiters () const noexcept |
| Return the number of awaiters, needed by the TaskFactory model. | |
Public Attributes | |
| std::tuple< Aw... > | bufs_ |
| Underlying awaiters. | |
| int | pending_ = sizeof...(Aw) |
| Number of awaiters that still need to suspend. | |
| std::array< bool, sizeof...(Aw)> | ready_ {} |
| Readiness flags. | |
Awaitable that waits for all provided awaiters to complete.
This meets the TaskFactoryAwaitable concept.
| Aw | Registration-style awaiters that return void from await_suspend(BasicTask). |
|
inlinenoexcept |
Check if all awaiters are ready.
|
inline |
Resume all awaiters and collect their results.
Referenced child awaiters resume as lvalues, while child awaiters owned by this join resume as rvalues. The result tuple preserves lvalue references and owns value or rvalue-reference results.
|
inlinenoexcept |
Suspend the coroutine on awaiters not yet ready.
| Promise | The coroutine’s promise type. |
| f | TaskFactory that provides one BasicTask per sub-awaitable |
|
inlinenoexcept |
Return the number of awaiters, needed by the TaskFactory model.
| std::tuple<Aw...> uni20::async::AllAwaiter< Aw >::bufs_ |
Underlying awaiters.
| int uni20::async::AllAwaiter< Aw >::pending_ = sizeof...(Aw) |
Number of awaiters that still need to suspend.
| std::array<bool, sizeof...(Aw)> uni20::async::AllAwaiter< Aw >::ready_ {} |
Readiness flags.