Aggregates multiple ThreadRegistry instances into a single queryable view.
More...
#include <thread_registry.hpp>
Aggregates multiple ThreadRegistry instances into a single queryable view.
CompositeThreadRegistry is useful when threads are spread across several independent ThreadRegistry instances (e.g. one per shared library) and you want a unified query interface over all of them.
- Thread safety
- All public methods are thread-safe. The internal list of attached registries is protected by a
std::mutex.
- Copyability / movability
- Not copyable and not movable (holds a
std::mutex).
- Ownership
- attach() stores raw pointers to the supplied registries. The caller is responsible for ensuring that every attached ThreadRegistry outlives this CompositeThreadRegistry. Violating this results in undefined behaviour.
- Deduplication
- No deduplication is performed. If the same TID appears in multiple attached registries, it will appear multiple times in the merged QueryView.
- Querying
- query() iterates over every attached registry, calls its own query(), and concatenates the results into a single ThreadRegistry::QueryView snapshot. The same functional-style helpers (filter, map, for_each, etc.) are available directly on CompositeThreadRegistry for convenience.
Definition at line 884 of file thread_registry.hpp.
◆ all()
template<typename Predicate>
| auto threadschedule::CompositeThreadRegistry::all |
( |
Predicate && | pred | ) |
const -> bool
|
|
inlinenodiscard |
◆ any()
template<typename Predicate>
| auto threadschedule::CompositeThreadRegistry::any |
( |
Predicate && | pred | ) |
const -> bool
|
|
inlinenodiscard |
◆ apply()
template<typename Predicate, typename Fn>
| void threadschedule::CompositeThreadRegistry::apply |
( |
Predicate && | pred, |
|
|
Fn && | fn ) const |
|
inline |
◆ attach()
| void threadschedule::CompositeThreadRegistry::attach |
( |
ThreadRegistry * | reg | ) |
|
|
inline |
◆ count()
| auto threadschedule::CompositeThreadRegistry::count |
( |
| ) |
const -> size_t
|
|
inlinenodiscard |
◆ empty()
| auto threadschedule::CompositeThreadRegistry::empty |
( |
| ) |
const -> bool
|
|
inlinenodiscard |
◆ filter()
template<typename Predicate>
◆ find_if()
template<typename Predicate>
| auto threadschedule::CompositeThreadRegistry::find_if |
( |
Predicate && | pred | ) |
const -> std::optional<RegisteredThreadInfo>
|
|
inlinenodiscard |
◆ for_each()
template<typename Fn>
| void threadschedule::CompositeThreadRegistry::for_each |
( |
Fn && | fn | ) |
const |
|
inline |
◆ map()
template<typename Fn>
| auto threadschedule::CompositeThreadRegistry::map |
( |
Fn && | fn | ) |
const -> std::vector<std::invoke_result_t<Fn, RegisteredThreadInfo const&>>
|
|
inlinenodiscard |
◆ none()
template<typename Predicate>
| auto threadschedule::CompositeThreadRegistry::none |
( |
Predicate && | pred | ) |
const -> bool
|
|
inlinenodiscard |
◆ query()
◆ skip()
◆ take()
The documentation for this class was generated from the following file: