47 const CpuIndexes & cpuIndexes()
const;
50 CpuIndexes & cpuIndexes();
53 std::string toString();
61 CpuIndexes * indexes_;
70 static void sleep(
unsigned int milliseconds);
73 static void spinWait(
int microseconds);
76 static void affinity(
const CpuIndexes & cpuIndexes);
79 static void affinity(CpuIndex cpuIndex);
82 static void priority(
int priority);
88 static void policy(
int policy);
106 explicit Thread(
const std::string & name);
124 bool stopRequested()
const;
135 virtual void run() = 0;
Represents set of CPU indices.
size_t CpuIndex
Logical processors that a thread is allowed to run on (first logical CPU has index 0)...
#define ONIXS_FIXENGINE_API
pthread_t ThreadId
Type alias for thread identifier.
std::set< CpuIndex > CpuIndexes
Exposes manipulations over the current thread.