Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
boost::fibers::asio::detail::async_result_base Class Reference

#include <yield.hpp>

Inheritance diagram for boost::fibers::asio::detail::async_result_base:

Public Member Functions

 async_result_base (yield_handler_base &h)
 
void get ()
 

Detailed Description

Definition at line 176 of file yield.hpp.

Constructor & Destructor Documentation

◆ async_result_base()

boost::fibers::asio::detail::async_result_base::async_result_base ( yield_handler_base & h)
inlineexplicit

Definition at line 178 of file yield.hpp.

178 {
179 // Inject ptr to our yield_completion instance into this
180 // yield_handler<>.
181 h.ycomp_ = & this->ycomp_;
182 // if yield_t didn't bind an error_code, make yield_handler_base's
183 // error_code* point to an error_code local to this object so
184 // yield_handler_base::operator() can unconditionally store through
185 // its error_code*
186 if ( ! h.yt_.ec_) {
187 h.yt_.ec_ = & ec_;
188 }
189 }

Member Function Documentation

◆ get()

void boost::fibers::asio::detail::async_result_base::get ( )
inline

Definition at line 191 of file yield.hpp.

191 {
192 // Unless yield_handler_base::operator() has already been called,
193 // suspend the calling fiber until that call.
194 ycomp_.wait();
195 // The only way our own ec_ member could have a non-default value is
196 // if our yield_handler did not have a bound error_code AND the
197 // completion callback passed a non-default error_code.
198 if ( ec_) {
199 throw_exception( boost::system::system_error{ ec_ } );
200 }
201 }
void throw_exception(std::exception const &e)
Here is the call graph for this function:
Here is the caller graph for this function:

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