tin  1.5.9
tsm::yield_awaitable Struct Reference

#include <coroutine.h>

Collaboration diagram for tsm::yield_awaitable:
Collaboration graph

Public Member Functions

bool await_ready () const noexcept
 
void await_suspend (task::handle_type handle) const noexcept
 
void await_resume () const noexcept
 

Detailed Description

Cooperative yield point for static runtime tasks.

Task loops use yield_awaitable to give other ready work a chance to run without blocking an OS thread. Awaiting it marks the current task ready again and returns control to the executor. The executor may then run another task or dispatch queued runtime work before this task resumes.

Application code uses tsm::yield().

Member Function Documentation

◆ await_ready()

bool tsm::yield_awaitable::await_ready ( ) const
inlinenoexcept

◆ await_resume()

void tsm::yield_awaitable::await_resume ( ) const
inlinenoexcept

◆ await_suspend()

void tsm::yield_awaitable::await_suspend ( task::handle_type  handle) const
inlinenoexcept

The documentation for this struct was generated from the following file: