Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
thread_conditions.h File Reference

Enumeration of thread lifecycle states (starting, running, stopping, stopped). More...

#include <kcenon/thread/utils/formatter.h>
#include <kcenon/thread/utils/convert_string.h>
#include <string>
#include <array>
#include <cstdint>
#include <string_view>
Include dependency graph for thread_conditions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  std::formatter< kcenon::thread::thread_conditions >
 Specialization of std::formatter for kcenon::thread::thread_conditions. More...
 
struct  std::formatter< kcenon::thread::thread_conditions, wchar_t >
 Specialization of std::formatter for wide-character kcenon::thread::thread_conditions. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::thread
 Core threading foundation of the thread system library.
 
namespace  kcenon::thread::job_detail
 

Enumerations

enum class  kcenon::thread::thread_conditions : uint8_t {
  kcenon::thread::Created , kcenon::thread::Waiting , kcenon::thread::Working , kcenon::thread::Stopping ,
  kcenon::thread::Stopped
}
 Enumeration of various states in a thread's lifecycle. More...
 

Functions

constexpr std::string_view kcenon::thread::to_string (thread_conditions condition)
 Converts a thread_conditions value to its corresponding string representation.
 
auto kcenon::thread::get_all_thread_conditions (void) -> std::vector< thread_conditions >
 Retrieves a vector containing all possible thread_conditions values.
 

Variables

constexpr std::array kcenon::thread::job_detail::thread_conditions_strings = { "created", "waiting", "working", "stopping", "stopped" }
 Array of string representations corresponding to each thread_conditions state.
 
constexpr size_t kcenon::thread::job_detail::thread_conditions_count = thread_conditions_strings.size()
 Total number of states defined in thread_conditions.
 

Detailed Description

Enumeration of thread lifecycle states (starting, running, stopping, stopped).

See also
thread_base For the class that uses these states

Definition in file thread_conditions.h.