#include <AsioContext.h>
Public Member Functions | |
| AsioContext (size_t nbThreads=1) | |
| virtual | ~AsioContext () |
| void | stopActivity () |
Public Attributes | |
| boost::asio::io_context *const | context |
Boost Asio async tasks management is pretty complicated. This class guarantees that we hold this complexity in one place.
| conscience_core::communication::AsioContext::AsioContext | ( | size_t | nbThreads = 1 | ) |
Creates and starts context activity with given number of threads.
|
virtual |
stops all context activity (if not already done, usually it should be done before, please see stopActivity()) and delete pointers
| void conscience_core::communication::AsioContext::stopActivity | ( | ) |
Call this to stop activity before deleting objects depending on this context. Then call destructor of this context
| boost::asio::io_context* const conscience_core::communication::AsioContext::context |