|
Lightweight 0.20260617.0
|
#include <Executor.hpp>
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 | |
| IExecutor & | operator= (IExecutor const &)=delete |
| IExecutor (IExecutor &&)=delete | |
| IExecutor & | operator= (IExecutor &&)=delete |
Public Member Functions inherited from Lightweight::Async::IResumeScheduler | |
| IResumeScheduler (IResumeScheduler const &)=delete | |
| IResumeScheduler & | operator= (IResumeScheduler const &)=delete |
| IResumeScheduler (IResumeScheduler &&)=delete | |
| IResumeScheduler & | operator= (IResumeScheduler &&)=delete |
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.
|
inlineoverridevirtual |
Schedules work to run on the executor. Thread-safe.
| work | The work item to enqueue (consumed). |
Implements Lightweight::Async::IExecutor.
Definition at line 66 of file Executor.hpp.
|
inlineoverridevirtual |
Schedules handle to be resumed. Thread-safe.
| handle | The coroutine to resume. |
Implements Lightweight::Async::IResumeScheduler.
Definition at line 72 of file Executor.hpp.