|
Lightweight 0.20260617.0
|
#include <Executor.hpp>
Public Member Functions | |
| IExecutor (IExecutor const &)=delete | |
| IExecutor & | operator= (IExecutor const &)=delete |
| IExecutor (IExecutor &&)=delete | |
| IExecutor & | operator= (IExecutor &&)=delete |
| virtual void | Post (Work work)=0 |
Interface for an executor that runs posted work items.
Executors are injected (dependency injection) and owned by the caller; the async layer only ever holds references to them. Every implementation's Post is thread-safe.
Definition at line 21 of file Executor.hpp.
|
pure virtual |
Schedules work to run on the executor. Thread-safe.
| work | The work item to enqueue (consumed). |
Implemented in Lightweight::Async::InlineExecutor, Lightweight::Async::ManualExecutor, Lightweight::Async::StrandExecutor, and Lightweight::Async::ThreadPoolExecutor.