34#include <NDEVR/String.h>
35#include <NDEVR/Dictionary.h>
36#if NDEVR_SUPPORTS_THREADING
58 static void RequestSleep(
uint08 milliseconds);
59 static uint04 s_primary_thread_id;
61#if NDEVR_SUPPORTS_THREADING
97 static uint08 GetThreadCount() {
return s_thread_count; }
98 static void _setThreadName(
const String& name);
101 std::thread* m_tid =
nullptr;
102 uint04 m_thread_id = Constant<uint04>::Invalid;
104 volatile bool m_is_running =
false;
105 volatile bool m_is_single_run =
true;
107 volatile static uint04 s_thread_count;
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
The core String class for the NDEVR API.
Definition String.h:69
Functions for interfacing with the current thread. If threading is disabled.
Definition Thread.h:47
static String CurrentThreadName()
static bool IsPrimaryThread()
static void RequestSleep(const TimeSpan &interval)
static void SetCurrentThreadName(const String &name)
static void SetPrimaryThreadID(uint04 primary_thread)
static uint04 PrimaryThreadID()
static void RequestNoSleep(bool request_no_sleep)
static uint04 CurrentThreadID()
A thread is a single sequence stream within the software.
Definition Thread.h:67
const String & threadName() const
Definition Thread.h:84
static void StopAllThreads()
static Thread & CurrentThread()
virtual void stopThread()
static String CurrentThreadName()
void setThreadName(const String &name)
virtual bool shouldExitThread() const
Thread(const String &name)
virtual void run()
Definition Thread.h:93
void forceStop()
Definition Thread.h:80
virtual void requestStopThread()
static void SetCurrentThreadName(const String &name)
bool isPrimaryThread() const
static void ServiceVirtualThreads()
Thread(const Thread &name)=delete
const std::thread & self()
void setIsPrimaryThread(bool is_primary_thread)
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
Definition BaseValues.hpp:106
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96