Go to the documentation of this file.
21 #include <boost/asio/io_service.hpp>
22 #include <boost/asio/strand.hpp>
48 using Strand = Context::IoContext::strand;
76 std::shared_ptr<IoContext> ctx_;
78 std::shared_ptr<std::unique_ptr<WorkGuard>> work_;
105 std::shared_ptr<Context::Strand> strand_;
Definition: backtrace.cpp:102
IoContext & getAsioIoContext()
Returns a reference to the owned io_context.
Definition: context.cpp:31
Context::IoContext & getAsioIoContext()
Return the io_context owned by the Context member.
Definition: context.cpp:52
ContextStrand(Context const &ctx)
Default constructor of a stranded context based on an allocated Context.
Definition: context.cpp:48
Context::IoContext::strand Strand
Definition: context.h:48
void run()
Run the io_context.
Definition: context.cpp:37
std::shared_ptr< IoContext > getAsioIoContextPtr()
Returns a shared pointer to the owned io_context.
Definition: context.cpp:33
boost::asio::io_service::work WorkGuard
Definition: context.h:45
void clearWorkGuard()
clear the work for advanced use cases where you want to execute a finite number of tasks,...
Definition: context.cpp:44
void setWorkGuard()
Create a new pointer for the worker guard.
Definition: context.cpp:46
Context::Strand & getAsioStrand()
Return the io_context::strand` owned by the object instance.
Definition: context.cpp:56
A class that represents an Output type to be used in a Component.
Definition: context.h:38
boost::asio::io_service IoContext
Definition: context.h:47
void restartAndRun()
Definition: context.cpp:39
Context getContext() const
Returns the owned Context by the component.
Definition: context.cpp:59
Contains a stranded context to post and dispatch handlers with the guarantee that none of the handler...
Definition: context.h:86
Context()
Default constructor of a context.
Definition: context.cpp:24
Contains the execution state context.
Definition: context.h:41