farm-ng-core
farm_ng::ContextStrand Class Reference

Contains a stranded context to post and dispatch handlers with the guarantee that none of the handlers will execute concurrently. More...

#include <context.h>

Public Member Functions

 ContextStrand (Context const &ctx)
 Default constructor of a stranded context based on an allocated Context. More...
 
Context::IoContextgetAsioIoContext ()
 Return the io_context owned by the Context member. More...
 
Context::StrandgetAsioStrand ()
 Return the io_context::strand` owned by the object instance. More...
 
Context getContext () const
 Returns the owned Context by the component. More...
 

Detailed Description

Contains a stranded context to post and dispatch handlers with the guarantee that none of the handlers will execute concurrently.

More info: https://www.boost.org/doc/libs/1_78_0/doc/html/boost_asio/reference/io_context__strand.html

Constructor & Destructor Documentation

◆ ContextStrand()

farm_ng::ContextStrand::ContextStrand ( Context const &  ctx)
explicit

Default constructor of a stranded context based on an allocated Context.

Member Function Documentation

◆ getAsioIoContext()

Context::IoContext & farm_ng::ContextStrand::getAsioIoContext ( )

Return the io_context owned by the Context member.

◆ getAsioStrand()

Context::Strand & farm_ng::ContextStrand::getAsioStrand ( )

Return the io_context::strand` owned by the object instance.

◆ getContext()

Context farm_ng::ContextStrand::getContext ( ) const

Returns the owned Context by the component.


The documentation for this class was generated from the following files: