|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Keeps an Asio I/O context running on a dedicated worker thread. More...
#include <AsioIoContextRunner.h>
Inheritance diagram for profinet::AsioIoContextRunner:
Collaboration diagram for profinet::AsioIoContextRunner:Public Member Functions | |
| AsioIoContextRunner (asio::io_context &ioContext) | |
| Start running the supplied I/O context. | |
| ~AsioIoContextRunner () | |
| Stop the worker thread. | |
| AsioIoContextRunner (const AsioIoContextRunner &)=delete | |
| AsioIoContextRunner & | operator= (const AsioIoContextRunner &)=delete |
Public Member Functions inherited from profinet::IAsioIoContextRunner | |
| virtual | ~IAsioIoContextRunner ()=default |
| IAsioIoContextRunner ()=default | |
| IAsioIoContextRunner (const IAsioIoContextRunner &)=delete | |
| IAsioIoContextRunner & | operator= (const IAsioIoContextRunner &)=delete |
| IAsioIoContextRunner (IAsioIoContextRunner &&)=delete | |
| IAsioIoContextRunner & | operator= (IAsioIoContextRunner &&)=delete |
Private Attributes | |
| asio::io_context & | ioContext |
| asio::executor_work_guard< asio::io_context::executor_type > | workGuard |
| std::jthread | thread |
Keeps an Asio I/O context running on a dedicated worker thread.
The caller owns the io_context itself. This class only owns the work guard and worker thread required to keep the context executing.
The runner must outlive all asynchronous operations using the context.
Definition at line 34 of file AsioIoContextRunner.h.
|
inlineexplicit |
Start running the supplied I/O context.
| ioContext | I/O context to execute. |
Definition at line 39 of file AsioIoContextRunner.h.
References ioContext.
|
inline |
Stop the worker thread.
Definition at line 50 of file AsioIoContextRunner.h.
|
delete |
|
delete |
|
private |
Definition at line 65 of file AsioIoContextRunner.h.
Referenced by AsioIoContextRunner(), and ~AsioIoContextRunner().
|
private |
Definition at line 67 of file AsioIoContextRunner.h.
Referenced by ~AsioIoContextRunner().
|
private |
Definition at line 66 of file AsioIoContextRunner.h.
Referenced by ~AsioIoContextRunner().