Lightweight 0.20260617.0
Loading...
Searching...
No Matches
Lightweight::Async::IResumeScheduler Class Referenceabstract

#include <Executor.hpp>

Inheritance diagram for Lightweight::Async::IResumeScheduler:
Lightweight::Async::InlineExecutor Lightweight::Async::ManualExecutor Lightweight::Async::StrandExecutor Lightweight::Async::ThreadPoolExecutor

Public Member Functions

 IResumeScheduler (IResumeScheduler const &)=delete
 
IResumeScheduleroperator= (IResumeScheduler const &)=delete
 
 IResumeScheduler (IResumeScheduler &&)=delete
 
IResumeScheduleroperator= (IResumeScheduler &&)=delete
 
virtual void Resume (std::coroutine_handle<> handle)=0
 

Detailed Description

Interface for scheduling the resumption of a suspended coroutine.

Kept separate from IExecutor::Post so resumption can be expressed as a bare coroutine handle, which lets implementations avoid wrapping every resume in a Work allocation on hot paths.

Definition at line 42 of file Executor.hpp.

Member Function Documentation

◆ Resume()

virtual void Lightweight::Async::IResumeScheduler::Resume ( std::coroutine_handle<>  handle)
pure virtual

Schedules handle to be resumed. Thread-safe.

Parameters
handleThe coroutine to resume.

Implemented in Lightweight::Async::InlineExecutor, Lightweight::Async::ManualExecutor, Lightweight::Async::StrandExecutor, and Lightweight::Async::ThreadPoolExecutor.


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