OpenTTD
Public Member Functions | Static Public Member Functions
ThreadObject Class Referenceabstract

A Thread Object which works on all our supported OSes. More...

#include <thread.h>

Inheritance diagram for ThreadObject:
ThreadObject_MorphOS ThreadObject_OS2 ThreadObject_pthread ThreadObject_Win32

Public Member Functions

virtual ~ThreadObject ()
 Virtual destructor to allow 'delete' operator to work properly.
 
virtual bool Exit ()=0
 Exit this thread.
 
virtual void Join ()=0
 Join this thread.
 

Static Public Member Functions

static bool New (OTTDThreadFunc proc, void *param, ThreadObject **thread=NULL, const char *name=NULL)
 Create a thread; proc will be called as first function inside the thread, with optional params. More...
 

Detailed Description

A Thread Object which works on all our supported OSes.

Definition at line 24 of file thread.h.

Member Function Documentation

◆ New()

bool ThreadObject::New ( OTTDThreadFunc  proc,
void *  param,
ThreadObject **  thread = NULL,
const char *  name = NULL 
)
static

Create a thread; proc will be called as first function inside the thread, with optional params.

Parameters
procThe procedure to call inside the thread.
paramThe params to give with 'proc'.
threadPlace to store a pointer to the thread in. May be NULL.
nameA name for the thread. May be NULL.
Returns
True if the thread was started correctly.

Definition at line 196 of file thread_morphos.cpp.

Referenced by VideoDriver_Win32::MainLoop(), NetworkUDPQueryServer(), NetworkUDPRemoveAdvertise(), ScanNewGRFFiles(), LinkGraphJob::SpawnThread(), and TCPConnecter::TCPConnecter().


The documentation for this class was generated from the following files: