Cbeam
Loading...
Searching...
No Matches
thread.hpp File Reference
#include <cbeam/convert/string.hpp>
#include <cstddef>
#include <iomanip>
#include <sstream>
#include <string>
#include <thread>
#include <cbeam/platform/windows_config.hpp>
Include dependency graph for thread.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cbeam::concurrency::tagTHREADNAME_INFO
 

Namespaces

namespace  cbeam
 The root namespace for the Cbeam library. This namespace unifies cross-platform utilities for concurrency, memory management, file handling, logging, serialization, and more. Its purpose is to provide a cohesive collection of modern C++ components that address common system-level and application-level tasks, while promoting thread-safety, interprocess communication, and stable resource handling across varied platform APIs.
 
namespace  cbeam::concurrency
 Provides concurrency primitives and abstractions for multithreaded programming. It features the powerful message_manager class for managing asynchronous message queues with flexible ordering (FIFO, FILO, or RANDOM), as well as threaded_object, which uses CRTP to encapsulate worker-thread logic with built-in synchronization. These classes simplify threaded operations, interprocess synchronization, and message dispatch under varying concurrency scenarios.
 

Typedefs

using cbeam::concurrency::thread_id_type = HANDLE
 
typedef struct cbeam::concurrency::tagTHREADNAME_INFO cbeam::concurrency::THREADNAME_INFO
 

Functions

thread_id_type cbeam::concurrency::get_current_thread_id ()
 Retrieves the current thread's native identifier.
 
void cbeam::concurrency::set_thread_name (uint32_t dwThreadID, const char *thread_name)
 Sets the name for a thread with a specified Thread ID.
 
void cbeam::concurrency::set_thread_name (const char *thread_name)
 Sets the name of the current thread.
 
void cbeam::concurrency::set_thread_name (std::thread &thread, const char *thread_name)
 Sets the name of a std::thread on Windows.
 
std::wstring cbeam::concurrency::get_thread_name (thread_id_type id)
 Retrieves the name of the specified thread.
 
std::wstring cbeam::concurrency::to_string (concurrency::thread_id_type id, std::size_t mask=(std::size_t) -1)
 Returns a hexadecimal string representation of the given thread ID.