|
farm-ng-core
|
Contains the execution state context. More...
#include <context.h>
Public Types | |
| using | WorkGuard = boost::asio::io_service::work |
| using | IoContext = boost::asio::io_service |
| using | Strand = Context::IoContext::strand |
Public Member Functions | |
| Context () | |
| Default constructor of a context. More... | |
| IoContext & | getAsioIoContext () |
Returns a reference to the owned io_context. More... | |
| std::shared_ptr< IoContext > | getAsioIoContextPtr () |
Returns a shared pointer to the owned io_context. More... | |
| void | run () |
Run the io_context. More... | |
| void | restartAndRun () |
| void | clearWorkGuard () |
| clear the work for advanced use cases where you want to execute a finite number of tasks, e.g. in tests, or to run the pipeline to completion for a given input. More... | |
| void | setWorkGuard () |
| Create a new pointer for the worker guard. More... | |
Contains the execution state context.
| using farm_ng::Context::IoContext = boost::asio::io_service |
| using farm_ng::Context::Strand = Context::IoContext::strand |
| using farm_ng::Context::WorkGuard = boost::asio::io_service::work |
| farm_ng::Context::Context | ( | ) |
Default constructor of a context.
| void farm_ng::Context::clearWorkGuard | ( | ) |
clear the work for advanced use cases where you want to execute a finite number of tasks, e.g. in tests, or to run the pipeline to completion for a given input.
| Context::IoContext & farm_ng::Context::getAsioIoContext | ( | ) |
Returns a reference to the owned io_context.
| std::shared_ptr< Context::IoContext > farm_ng::Context::getAsioIoContextPtr | ( | ) |
Returns a shared pointer to the owned io_context.
| void farm_ng::Context::restartAndRun | ( | ) |
| void farm_ng::Context::run | ( | ) |
Run the io_context.
| void farm_ng::Context::setWorkGuard | ( | ) |
Create a new pointer for the worker guard.