ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
thread_registry_backend.hpp File Reference

Registry storage, mutation, snapshots, and private runtime hooks. More...

#include "../../expected.hpp"
#include "../../export.hpp"
#include "../callable/copyable_function.hpp"
#include "query_facade_mixin.hpp"
#include "thread_control_block.hpp"
#include <memory>
#include <optional>
#include <shared_mutex>
#include <string>
#include <system_error>
#include <thread>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
Include dependency graph for thread_registry_backend.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  threadschedule::detail::thread_registry_backend
 Central registry of threads indexed by OS-level thread ID (native_thread_id). More...
 
class  threadschedule::detail::thread_registry_backend::query_view
 Lazy, functional-style query/filter view over a snapshot of registered threads. More...
 
struct  threadschedule::detail::external_registry_binding_state
 

Namespaces

namespace  threadschedule
 
namespace  threadschedule::detail
 Aggregates multiple thread_registry_backend instances into a single queryable view.
 

Functions

Global registry access

These internal free functions provide access to a process-wide thread_registry_backend singleton and allow installing a custom instance.

Header-only mode (default)
The runtime registry functions are inline and use function-local statics. runtime_registry() returns the installed backend when one exists, otherwise a function-local default instance.
Runtime / shared-library mode (THREADSCHEDULE_RUNTIME defined)
The functions are declared here but defined in runtime_registry.cpp. This ensures a single registry instance across shared-library boundaries even when the header is included from multiple translation units in different DSOs.
auto threadschedule::detail::runtime_registry () -> thread_registry_backend &
 
void threadschedule::detail::runtime_set_external_registry (thread_registry_backend *reg)
 
auto threadschedule::detail::runtime_exchange_external_registry (thread_registry_backend *reg) -> thread_registry_backend *
 
void threadschedule::detail::runtime_set_external_registry_state (std::shared_ptr< external_registry_binding_state > state)
 
auto threadschedule::detail::runtime_exchange_external_registry_state (std::shared_ptr< external_registry_binding_state > state) -> std::shared_ptr< external_registry_binding_state >
 
auto threadschedule::detail::runtime_external_registry_state () -> std::shared_ptr< external_registry_binding_state >
 

Detailed Description

Registry storage, mutation, snapshots, and private runtime hooks.

Definition in file thread_registry_backend.hpp.