MySQL 9.1.0
Source Code Documentation
executor.h File Reference
#include <algorithm>
#include <condition_variable>
#include <functional>
#include <list>
#include <memory>
#include <mutex>
#include <queue>
#include <stdexcept>
#include <thread>
#include <type_traits>
#include <typeindex>
#include <unordered_map>
#include <utility>
#include "my_compiler.h"
#include "mysql/harness/net_ts/impl/callstack.h"
#include "mysql/harness/net_ts/netfwd.h"

Go to the source code of this file.

Classes

class  net::async_result< CompletionToken, Signature >
 
class  net::async_completion< CompletionToken, Signature >
 
struct  net::associated_allocator_impl< T, ProtoAllocator, typename >
 
struct  net::associated_allocator_impl< T, ProtoAllocator, std::void_t< typename T::allocator_type > >
 
struct  net::associated_allocator< T, ProtoAllocator >
 
class  net::service_already_exists
 
class  net::execution_context
 
struct  net::execution_context::ServicePtr
 
class  net::execution_context::service
 
struct  net::impl::is_executor< T, class >
 
struct  net::impl::is_executor< T, decltype(executor_requirements< T >())>
 
struct  net::is_executor< T >
 
struct  net::executor_arg_t
 
struct  net::impl::uses_executor< T, Executor, typename >
 
struct  net::impl::uses_executor< T, Executor, std::void_t< typename T::executor_type > >
 
struct  net::uses_executor< T, Executor >
 
struct  net::associated_executor_impl< T, Executor, typename >
 
struct  net::associated_executor_impl< T, Executor, std::void_t< typename T::executor_type > >
 
struct  net::associated_executor< T, Executor >
 
class  net::executor_work_guard< Executor >
 
class  net::system_executor
 
class  net::system_context
 
struct  net::system_context::__tag
 
class  net::impl::Dispatcher< CompletionHandler >
 function object for net::dispatch(), net::post(), net::defer(). More...
 
class  net::strand< Executor >
 

Namespaces

namespace  net
 
namespace  net::impl
 

Typedefs

template<class T , class ProtoAllocator = std::allocator<void>>
using net::associated_allocator_t = typename associated_allocator< T, ProtoAllocator >::type
 
template<class T , class Executor = system_executor>
using net::associated_executor_t = typename associated_executor< T, Executor >::type
 

Enumerations

enum class  net::fork_event { net::prepare , net::parent , net::child }
 

Functions

template<class T >
associated_allocator_t< T > net::get_associated_allocator (const T &t) noexcept
 
template<class T , class ProtoAllocator >
associated_allocator_t< T > net::get_associated_allocator (const T &t, const ProtoAllocator &a) noexcept
 
template<class Service >
Service::key_type & net::use_service (execution_context &ctx)
 
template<class Service , class... Args>
Service & net::make_service (execution_context &ctx, Args &&...args)
 
template<class Service >
bool net::has_service (const execution_context &ctx) noexcept
 
template<class T , typename U = std::remove_const_t<T>>
auto net::impl::executor_requirements (U *__x=nullptr, const U *__const_x=nullptr, void(*f)()=nullptr, const std::allocator< int > &a={}) -> std::enable_if_t< std::conjunction< std::is_copy_constructible< T >, std::is_same< decltype(*__const_x== *__const_x), bool >, std::is_same< decltype(*__const_x != *__const_x), bool >, std::is_void< decltype(__x->on_work_started())>, std::is_void< decltype(__x->on_work_finished())>, std::is_void< decltype(__x->dispatch(std::move(f), a))>, std::is_void< decltype(__x->post(std::move(f), a))>, std::is_void< decltype(__x->defer(std::move(f), a))> >::value, std::void_t< decltype(__x->context()), void()> >
 
template<class T >
associated_executor_t< T > net::get_associated_executor (const T &t) noexcept
 
template<class T , class Executor >
associated_executor_t< T, Executor > net::get_associated_executor (const T &t, const Executor &ex) noexcept
 
template<class T , class ExecutorContext >
associated_executor_t< T, typename ExecutorContext::executor_type > net::get_associated_executor (const T &t, const ExecutorContext &ctx) noexcept
 
template<class Executor >
requires (is_executor_v<Executor>)
executor_work_guard< Executor > net::make_work_guard (const Executor &ex)
 
template<class ExecutionContext >
requires (std::is_convertible_v<ExecutionContext &, execution_context &>)
executor_work_guard< typename ExecutionContext::executor_type > net::make_work_guard (ExecutionContext &ctx)
 
template<class T >
requires (!is_executor_v<T> && !std::is_convertible_v<T &, execution_context &>)
executor_work_guard< associated_executor_t< T > > net::make_work_guard (const T &t)
 
template<class T , class U >
auto net::make_work_guard (const T &t, U &&u) -> decltype(make_work_guard(get_associated_executor(t, std::forward< U >(u))))
 
bool net::operator== (const system_executor &, const system_executor &)
 
bool net::operator!= (const system_executor &, const system_executor &)
 
template<class CompletionHandler >
Dispatcher< CompletionHandler > net::impl::make_dispatcher (CompletionHandler &handler)
 
template<class CompletionToken >
auto net::dispatch (CompletionToken &&token)
 
template<class Executor , class CompletionToken >
requires (is_executor_v<Executor>)
async_result< std::decay_t< CompletionToken >, void()>::return_type net::dispatch (const Executor &ex, CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class ExecutionContext , class CompletionToken >
requires (std::is_convertible_v<ExecutionContext &, execution_context &>)
async_result< std::decay_t< CompletionToken >, void()>::return_type net::dispatch (ExecutionContext &ctx, CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class CompletionToken >
auto net::post (CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class Executor , class CompletionToken >
requires (is_executor_v<Executor>)
async_result< std::decay_t< CompletionToken >, void()>::return_type net::post (const Executor &ex, CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class ExecutionContext , class CompletionToken >
requires (std::is_convertible_v<ExecutionContext &, execution_context &>)
async_result< std::decay_t< CompletionToken >, void()>::return_type net::post (ExecutionContext &ctx, CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class CompletionToken >
auto net::defer (CompletionToken &&token)
 
template<class Executor , class CompletionToken >
requires (is_executor_v<Executor>)
async_result< std::decay_t< CompletionToken >, void()>::return_type net::defer (const Executor &ex, CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class ExecutionContext , class CompletionToken >
requires (std::is_convertible_v<ExecutionContext &, execution_context &>)
async_result< std::decay_t< CompletionToken >, void()>::return_type net::defer (ExecutionContext &ctx, CompletionToken &&token)
 queue a function call for later execution. More...
 
template<class Executor >
bool net::operator== (const strand< Executor > &a, const strand< Executor > &b)
 
template<class Executor >
bool net::operator!= (const strand< Executor > &a, const strand< Executor > &b)
 

Variables

template<class T >
constexpr bool net::is_executor_v = is_executor<T>::value
 
constexpr executor_arg_t net::executor_arg = executor_arg_t()
 
template<class T , class Executor >
constexpr bool net::uses_executor_v = uses_executor<T, Executor>::value