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

Non-owning facade that merges snapshots from multiple registries. More...

#include <composite_thread_registry.hpp>

Public Member Functions

 composite_thread_registry ()=default
 
 composite_thread_registry (composite_thread_registry const &)=delete
 
auto operator= (composite_thread_registry const &) -> composite_thread_registry &=delete
 
void attach (thread_registry &registry)
 Attach a registry without transferring ownership.
 
auto snapshot () const -> result< std::vector< registered_thread > >
 Return one portable snapshot containing every attached registry.
 
auto count () const -> std::size_t
 Number of entries in a newly merged snapshot.
 
auto empty () const -> bool
 Whether a newly merged snapshot contains no entries.
 

Detailed Description

Non-owning facade that merges snapshots from multiple registries.

Attached registries must outlive this object. Snapshot creation is safe to call concurrently with attach() and with registration changes in the attached registries. Duplicate entries are intentionally preserved.

Definition at line 24 of file composite_thread_registry.hpp.

Constructor & Destructor Documentation

◆ composite_thread_registry() [1/2]

threadschedule::advanced::composite_thread_registry::composite_thread_registry ( )
default

◆ composite_thread_registry() [2/2]

threadschedule::advanced::composite_thread_registry::composite_thread_registry ( composite_thread_registry const &  )
delete

Member Function Documentation

◆ attach()

void threadschedule::advanced::composite_thread_registry::attach ( thread_registry registry)
inline

Attach a registry without transferring ownership.

Definition at line 33 of file composite_thread_registry.hpp.

References threadschedule::detail::composite_thread_registry_backend::attach().

◆ count()

auto threadschedule::advanced::composite_thread_registry::count ( ) const -> std::size_t
inline

Number of entries in a newly merged snapshot.

Definition at line 60 of file composite_thread_registry.hpp.

◆ empty()

auto threadschedule::advanced::composite_thread_registry::empty ( ) const -> bool
inline

Whether a newly merged snapshot contains no entries.

Definition at line 67 of file composite_thread_registry.hpp.

◆ operator=()

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

◆ snapshot()

auto threadschedule::advanced::composite_thread_registry::snapshot ( ) const -> result<std::vector<registered_thread>>
inline

Return one portable snapshot containing every attached registry.

Definition at line 43 of file composite_thread_registry.hpp.

References threadschedule::detail::thread_id_access::make(), and threadschedule::detail::composite_thread_registry_backend::query().


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