34 virtual bool Exit() = 0;
39 virtual void Join() = 0;
74 virtual void BeginCritical(
bool allow_recursive =
false) = 0;
82 virtual void EndCritical(
bool allow_recursive =
false) = 0;
90 virtual void WaitForSignal() = 0;
95 virtual void SendSignal() = 0;
Simple mutex locker to keep a mutex locked until the locker goes out of scope.
void(* OTTDThreadFunc)(void *)
Definition of all thread entry functions.
~ThreadMutexLocker()
Unlock the mutex.
virtual ~ThreadObject()
Virtual destructor to allow 'delete' operator to work properly.
uint GetCPUCoreCount()
Get number of processor cores in the system, including HyperThreading or similar. ...
ThreadMutexLocker(ThreadMutex *mutex)
Lock the mutex and keep it locked for the life time of this object.
virtual ~ThreadMutex()
Virtual Destructor to avoid compiler warnings.
virtual void BeginCritical(bool allow_recursive=false)=0
Begin the critical section.
A Thread Object which works on all our supported OSes.
Signal used for signalling we knowingly want to end the thread.