MySQL 8.4.0
Source Code Documentation
net::io_context::executor_type Class Reference

#include <io_context.h>

Public Member Functions

 executor_type (const executor_type &rhs) noexcept=default
 
 executor_type (executor_type &&rhs) noexcept=default
 
executor_typeoperator= (const executor_type &rhs) noexcept=default
 
executor_typeoperator= (executor_type &&rhs) noexcept=default
 
 ~executor_type ()=default
 
bool running_in_this_thread () const noexcept
 
io_contextcontext () const noexcept
 
void on_work_started () const noexcept
 
void on_work_finished () const noexcept
 
template<class Func , class ProtoAllocator >
void dispatch (Func &&f, const ProtoAllocator &a) const
 execute function. More...
 
template<class Func , class ProtoAllocator >
void post (Func &&f, const ProtoAllocator &a) const
 queue function for execution. More...
 
template<class Func , class ProtoAllocator >
void defer (Func &&f, const ProtoAllocator &a) const
 defer function call for later execution. More...
 

Private Member Functions

 executor_type (io_context &ctx)
 

Private Attributes

friend io_context
 
io_contextio_ctx_ {nullptr}
 

Constructor & Destructor Documentation

◆ executor_type() [1/3]

net::io_context::executor_type::executor_type ( const executor_type rhs)
defaultnoexcept

◆ executor_type() [2/3]

net::io_context::executor_type::executor_type ( executor_type &&  rhs)
defaultnoexcept

◆ ~executor_type()

net::io_context::executor_type::~executor_type ( )
default

◆ executor_type() [3/3]

net::io_context::executor_type::executor_type ( io_context ctx)
inlineexplicitprivate

Member Function Documentation

◆ context()

io_context & net::io_context::executor_type::context ( ) const
inlinenoexcept

◆ defer()

template<class Func , class ProtoAllocator >
void net::io_context::executor_type::defer ( Func &&  f,
const ProtoAllocator &  a 
) const
inline

defer function call for later execution.

Effect:

The executor:

  • SHALL NOT block forward progress of the caller pending completion of f().
  • SHOULD NOT begin f()'s progress before the call to defer() completes.

◆ dispatch()

template<class Func , class ProtoAllocator >
void net::io_context::executor_type::dispatch ( Func &&  f,
const ProtoAllocator &  a 
) const
inline

execute function.

Effect:

The executor

  • MAY block forward progress of the caller until f() finishes.

◆ on_work_finished()

void net::io_context::executor_type::on_work_finished ( ) const
inlinenoexcept

◆ on_work_started()

void net::io_context::executor_type::on_work_started ( ) const
inlinenoexcept

◆ operator=() [1/2]

executor_type & net::io_context::executor_type::operator= ( const executor_type rhs)
defaultnoexcept

◆ operator=() [2/2]

executor_type & net::io_context::executor_type::operator= ( executor_type &&  rhs)
defaultnoexcept

◆ post()

template<class Func , class ProtoAllocator >
void net::io_context::executor_type::post ( Func &&  f,
const ProtoAllocator &  a 
) const
inline

queue function for execution.

Effects:

The executor

  • SHALL NOT block forward progress of the caller pending completion of f().
  • MAY begin f() progress before the call to post completes.

◆ running_in_this_thread()

bool net::io_context::executor_type::running_in_this_thread ( ) const
inlinenoexcept

Member Data Documentation

◆ io_context

friend net::io_context::executor_type::io_context
private

◆ io_ctx_

io_context* net::io_context::executor_type::io_ctx_ {nullptr}
private

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