ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::global_registry_binding Class Reference

Temporarily bind an owning registry as the global external registry. More...

#include <thread_registry.hpp>

Public Member Functions

 global_registry_binding (thread_registry &registry)
 Install external binding.
 
 ~global_registry_binding ()
 
 global_registry_binding (global_registry_binding const &)=delete
 
auto operator= (global_registry_binding const &) -> global_registry_binding &=delete
 
 global_registry_binding (global_registry_binding &&other) noexcept
 
auto operator= (global_registry_binding &&other) noexcept -> global_registry_binding &
 

Detailed Description

Temporarily bind an owning registry as the global external registry.

Restores the previous binding on destruction.

Installing, moving, or destroying a binding, and move-assigning a bound registry, must not run concurrently with operations through global_registry. Bindings are intended to be installed during application startup and destroyed after worker threads have stopped using the global registry.

Definition at line 358 of file thread_registry.hpp.

Constructor & Destructor Documentation

◆ global_registry_binding() [1/3]

threadschedule::global_registry_binding::global_registry_binding ( thread_registry registry)
inlineexplicit

Install external binding.

Parameters
registryOwning registry instance.
Exceptions
std::invalid_argumentif registry is itself the global facade.

Definition at line 366 of file thread_registry.hpp.

References threadschedule::detail::runtime_exchange_external_registry_state().

◆ ~global_registry_binding()

threadschedule::global_registry_binding::~global_registry_binding ( )
inline

Definition at line 376 of file thread_registry.hpp.

◆ global_registry_binding() [2/3]

threadschedule::global_registry_binding::global_registry_binding ( global_registry_binding const &  )
delete

◆ global_registry_binding() [3/3]

threadschedule::global_registry_binding::global_registry_binding ( global_registry_binding &&  other)
inlinenoexcept

Definition at line 384 of file thread_registry.hpp.

Member Function Documentation

◆ operator=() [1/2]

auto threadschedule::global_registry_binding::operator= ( global_registry_binding &&  other) -> global_registry_binding&
inlinenoexcept

Definition at line 390 of file thread_registry.hpp.

◆ operator=() [2/2]

auto threadschedule::global_registry_binding::operator= ( global_registry_binding const &  ) -> global_registry_binding &=delete
delete

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