MySQL 8.0.39
Source Code Documentation
net::execution_context Class Reference

#include <executor.h>

Inheritance diagram for net::execution_context:
[legend]

Classes

class  service
 
struct  ServicePtr
 

Public Member Functions

 execution_context ()=default
 
 execution_context (const execution_context &)=delete
 
execution_contextoperator= (const execution_context &)=delete
 
virtual ~execution_context ()
 
void notify_fork (fork_event e)
 

Protected Types

using service_key_type = std::type_index
 

Protected Member Functions

void shutdown () noexcept
 
void destroy () noexcept
 
template<typename Service , class... Args>
serviceadd_service (Args &&... args)
 

Static Protected Member Functions

template<class Service >
static void service_deleter (service *svc)
 
template<class Key >
static service_key_type service_key ()
 maps selected type to unique identifier. More...
 

Protected Attributes

std::mutex services_mtx_
 
std::list< ServicePtrservices_
 
std::unordered_map< service_key_type, service * > keys_
 

Friends

template<class Service >
Service::key_type & use_service (execution_context &ctx)
 
template<class Service >
bool has_service (const execution_context &ctx) noexcept
 
template<class Service , class... Args>
Service & make_service (execution_context &ctx, Args &&... args)
 

Member Typedef Documentation

◆ service_key_type

using net::execution_context::service_key_type = std::type_index
protected

Constructor & Destructor Documentation

◆ execution_context() [1/2]

net::execution_context::execution_context ( )
default

◆ execution_context() [2/2]

net::execution_context::execution_context ( const execution_context )
delete

◆ ~execution_context()

virtual net::execution_context::~execution_context ( )
inlinevirtual

Member Function Documentation

◆ add_service()

template<typename Service , class... Args>
service * net::execution_context::add_service ( Args &&...  args)
inlineprotected

◆ destroy()

void net::execution_context::destroy ( )
inlineprotectednoexcept

◆ notify_fork()

void net::execution_context::notify_fork ( fork_event  e)
inline

◆ operator=()

execution_context & net::execution_context::operator= ( const execution_context )
delete

◆ service_deleter()

template<class Service >
static void net::execution_context::service_deleter ( service svc)
inlinestaticprotected

◆ service_key()

template<class Key >
static service_key_type net::execution_context::service_key ( )
inlinestaticprotected

maps selected type to unique identifier.

◆ shutdown()

void net::execution_context::shutdown ( )
inlineprotectednoexcept

Friends And Related Function Documentation

◆ has_service

template<class Service >
bool has_service ( const execution_context ctx)
friend

◆ make_service

template<class Service , class... Args>
Service & make_service ( execution_context ctx,
Args &&...  args 
)
friend

◆ use_service

template<class Service >
Service::key_type & use_service ( execution_context ctx)
friend

Member Data Documentation

◆ keys_

std::unordered_map<service_key_type, service *> net::execution_context::keys_
protected

◆ services_

std::list<ServicePtr> net::execution_context::services_
protected

◆ services_mtx_

std::mutex net::execution_context::services_mtx_
mutableprotected

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