12typedef unsigned long long thread_id_type;
44 bool delete_after_termination;
45 static void* execute_s(
void* args);
54 void start(
bool _delete_after_termination =
false);
62 static bool wait_for_signal_or_timeout(
condition_mutex& cm,
unsigned millisec);
64 static bool wait_for_signal_or_timeout_with_lock(
condition_mutex& cm,
unsigned millisec);
66 static void wait(
unsigned millisec);
75 void wait_for_completion();
81 static thread_id_type get_current_thread_id();
83 thread_id_type get_id()
const;
87extern CGV_API thread* start_in_thread(
void (*func)(thread_id_type),
bool _delete_after_termination =
false);
92#include <cgv/config/lib_end.h>
Thread class implementation that uses pthreads internally.
virtual void run()=0
thread function to override
bool is_running()
return true if thread is running
bool have_stop_request()
check if there is a stop request
A mutex that can wake up other threads by signals sent when a condition is fulfilled.