12 #ifndef ROC_CORE_THREAD_H_
13 #define ROC_CORE_THREAD_H_
59 virtual void run() = 0;
62 static void* thread_runner_(
void* ptr);
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Base class for non-copyable objects.
Base class for thread objects.
static ROC_ATTR_NODISCARD bool enable_realtime()
Raise current thread priority to realtime.
ROC_ATTR_NODISCARD bool start()
Start thread.
bool is_joinable() const
Check if thread was started and can be joined.
virtual void run()=0
Method to be executed in thread.
static uint64_t get_tid()
Get numeric identifier of current thread.
static uint64_t get_pid()
Get numeric identifier of current process.
Commonly used types and functions.