Lightweight 0.20260617.0
Loading...
Searching...
No Matches
Lightweight::Async::InlineExecutor Class Referencefinal

#include <Executor.hpp>

Inheritance diagram for Lightweight::Async::InlineExecutor:
Lightweight::Async::IExecutor Lightweight::Async::IResumeScheduler

Public Member Functions

void Post (Work work) override
 
void Resume (std::coroutine_handle<> handle) override
 
- Public Member Functions inherited from Lightweight::Async::IExecutor
 IExecutor (IExecutor const &)=delete
 
IExecutoroperator= (IExecutor const &)=delete
 
 IExecutor (IExecutor &&)=delete
 
IExecutoroperator= (IExecutor &&)=delete
 
- Public Member Functions inherited from Lightweight::Async::IResumeScheduler
 IResumeScheduler (IResumeScheduler const &)=delete
 
IResumeScheduleroperator= (IResumeScheduler const &)=delete
 
 IResumeScheduler (IResumeScheduler &&)=delete
 
IResumeScheduleroperator= (IResumeScheduler &&)=delete
 

Detailed Description

An executor that runs work synchronously on the calling thread.

Useful for tests and for degenerate single-threaded configurations where no thread hand-off is desired. Note that with synchronous ODBC drivers an InlineExecutor used as the offload target will block the calling thread for the duration of the call.

Definition at line 63 of file Executor.hpp.

Member Function Documentation

◆ Post()

void Lightweight::Async::InlineExecutor::Post ( Work  work)
inlineoverridevirtual

Schedules work to run on the executor. Thread-safe.

Parameters
workThe work item to enqueue (consumed).

Implements Lightweight::Async::IExecutor.

Definition at line 66 of file Executor.hpp.

◆ Resume()

void Lightweight::Async::InlineExecutor::Resume ( std::coroutine_handle<>  handle)
inlineoverridevirtual

Schedules handle to be resumed. Thread-safe.

Parameters
handleThe coroutine to resume.

Implements Lightweight::Async::IResumeScheduler.

Definition at line 72 of file Executor.hpp.


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