MySQL 8.0.39
Source Code Documentation
net::system_context Class Reference

#include <executor.h>

Inheritance diagram for net::system_context:
[legend]

Classes

struct  __tag
 

Public Types

using executor_type = system_executor
 

Public Member Functions

 system_context ()=delete
 
 system_context (const system_context &)=delete
 
system_contextoperator= (const system_context &)=delete
 
 ~system_context () override
 
executor_type get_executor () noexcept
 
void stop ()
 
bool stopped () const noexcept
 
void join ()
 
- Public Member Functions inherited from net::execution_context
 execution_context ()=default
 
 execution_context (const execution_context &)=delete
 
execution_contextoperator= (const execution_context &)=delete
 
virtual ~execution_context ()
 
void notify_fork (fork_event e)
 

Private Member Functions

 system_context (__tag)
 
void run_ ()
 
void post_ (std::function< void()> f)
 

Static Private Member Functions

static system_contextget_ () noexcept
 

Private Attributes

std::thread thread_
 
std::mutex mtx_
 
std::condition_variable cv_
 
std::queue< std::function< void()> > tasks_
 
bool stopped_ {false}
 

Friends

class system_executor
 

Additional Inherited Members

- Protected Types inherited from net::execution_context
using service_key_type = std::type_index
 
- Protected Member Functions inherited from net::execution_context
void shutdown () noexcept
 
void destroy () noexcept
 
template<typename Service , class... Args>
serviceadd_service (Args &&... args)
 
- Static Protected Member Functions inherited from net::execution_context
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 inherited from net::execution_context
std::mutex services_mtx_
 
std::list< ServicePtrservices_
 
std::unordered_map< service_key_type, service * > keys_
 

Member Typedef Documentation

◆ executor_type

Constructor & Destructor Documentation

◆ system_context() [1/3]

net::system_context::system_context ( )
delete

◆ system_context() [2/3]

net::system_context::system_context ( const system_context )
delete

◆ ~system_context()

net::system_context::~system_context ( )
inlineoverride

◆ system_context() [3/3]

net::system_context::system_context ( __tag  )
inlineprivate

Member Function Documentation

◆ get_()

static system_context & net::system_context::get_ ( )
inlinestaticprivatenoexcept

◆ get_executor()

executor_type net::system_context::get_executor ( )
inlinenoexcept

◆ join()

void net::system_context::join ( )
inline

◆ operator=()

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

◆ post_()

void net::system_context::post_ ( std::function< void()>  f)
inlineprivate

◆ run_()

void net::system_context::run_ ( )
inlineprivate

◆ stop()

void net::system_context::stop ( )
inline

◆ stopped()

bool net::system_context::stopped ( ) const
inlinenoexcept

Friends And Related Function Documentation

◆ system_executor

friend class system_executor
friend

Member Data Documentation

◆ cv_

std::condition_variable net::system_context::cv_
private

◆ mtx_

std::mutex net::system_context::mtx_
mutableprivate

◆ stopped_

bool net::system_context::stopped_ {false}
private

◆ tasks_

std::queue<std::function<void()> > net::system_context::tasks_
private

◆ thread_

std::thread net::system_context::thread_
private

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