|
| | task_context ()=default |
| |
| | task_context (static_coroutine_arena< 1U > *, std::size_t, std::size_t, std::size_t)=delete |
| |
| template<std::size_t Bytes> |
| void | bind (static_coroutine_arena< Bytes > &arena, std::size_t task_id, std::size_t instance_id, std::size_t frame_limit, void *scheduler, wake_fn wake, sleep_fn sleep, cancel_sleep_fn cancel_sleep) noexcept |
| |
| void * | allocate_frame (std::size_t bytes, std::size_t alignment) noexcept |
| |
| std::size_t | task_id () const noexcept |
| |
| std::size_t | instance_id () const noexcept |
| |
| tsm::tick_rep | now () const noexcept |
| |
| task_wait_kind | wait_kind () const noexcept |
| |
| task_status | status () const noexcept |
| |
| task_failure_reason | failure_reason () const noexcept |
| |
| std::uint32_t | generation () const noexcept |
| |
| void | set_now (tsm::tick_rep now) noexcept |
| |
| void | mark_ready () noexcept |
| |
| void | prepare_start () noexcept |
| |
| void | mark_running () noexcept |
| |
| void | sleep_for (tsm::tick_rep ticks) noexcept |
| |
| void | cancel_sleep () noexcept |
| |
| template<typename Object , typename Predicate > |
| void | wait_until (Object const &object, Predicate predicate) noexcept |
| |
| bool | ready_to_resume () const noexcept |
| |
| bool | predicate_ready () const noexcept |
| |
| void | mark_completed () noexcept |
| |
| void | mark_failed (task_failure_reason reason=task_failure_reason::unhandled_exception) noexcept |
| |
| void | cancel () noexcept |
| |
| void | request_wake () noexcept |
| |
| void | clear_queued () noexcept |
| |
Runtime state visible to awaitables created inside a task.
Awaitables do not talk to an executor directly. They mark this context as ready, sleeping, failed, or waiting on a predicate; the scheduler then uses the context to decide which coroutine can run next. This keeps awaitable types small and lets the executor enforce fixed queue and timer capacities.