|
Lightweight 0.20260617.0
|
#include <Backend.hpp>
Public Member Functions | |
| IAsyncBackend (IAsyncBackend const &)=delete | |
| IAsyncBackend & | operator= (IAsyncBackend const &)=delete |
| IAsyncBackend (IAsyncBackend &&)=delete | |
| IAsyncBackend & | operator= (IAsyncBackend &&)=delete |
| virtual StrandExecutor & | Strand () noexcept=0 |
| virtual IResumeScheduler & | ResumeScheduler () noexcept=0 |
Per-connection asynchronous execution backend.
A backend owns (or references) the execution context used to run a connection's blocking ODBC work and to resume the awaiting coroutine. Currently the only implementation is ThreadOffloadBackend (portable; offloads to a worker thread). A native event backend (Windows + SQL Server) is planned behind this same interface.
The backend is selected once per connection (see SqlConnection::EnableAsync) and used by all of that connection's async methods.
Definition at line 23 of file Backend.hpp.
|
pure virtualnoexcept |
The serializing executor for this connection; blocking work is offloaded here so the connection's ODBC handle is only ever touched by one thread at a time.
Implemented in Lightweight::Async::ThreadOffloadBackend.
|
pure virtualnoexcept |
The scheduler used to resume coroutines after a blocking step completes (typically the application's run loop).
Implemented in Lightweight::Async::ThreadOffloadBackend.