GlistEngine
Loading...
Searching...
No Matches
gThread Class Reference

#include <gThread.h>

Inheritance diagram for gThread:
Collaboration diagram for gThread:

Public Member Functions

 gThread ()
 
virtual ~gThread ()
 
std::thread::id getId () const
 
bool isRunning ()
 
bool isCurrent ()
 
bool isDone ()
 
std::thread & getThread ()
 
void start ()
 
void stop ()
 
bool lock ()
 
bool tryLock ()
 
void unlock ()
 
void wait ()
 
void sleep (std::chrono::duration< double, std::milli > milliseconds)
 
void sleep (double milliseconds)
 
void yield ()
 
void detach ()
 
virtual void threadFunction ()
 
- Public Member Functions inherited from gObject
 gObject ()
 
void logi (std::string message)
 
void logd (std::string message)
 
void logw (std::string message)
 
void loge (std::string message)
 
void logi (std::string tag, std::string message)
 
void logd (std::string tag, std::string message)
 
void logw (std::string tag, std::string message)
 
void loge (std::string tag, std::string message)
 

Protected Attributes

std::condition_variable conditionvariable
 
std::mutex mutex
 
bool isdone
 
bool isrunning
 

Additional Inherited Members

- Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
 
static std::string gGetAssetsDir ()
 
static void gSetAssetsDir (std::string assetsDir)
 
static std::string gGetFilesDir ()
 
static std::string gGetImagesDir ()
 
static std::string gGetFontsDir ()
 
static std::string gGetModelsDir ()
 
static std::string gGetTexturesDir ()
 
static std::string gGetShadersDir ()
 
static std::string gGetSoundsDir ()
 
static std::string gGetDatabasesDir ()
 
static std::string gGetVideosDir ()
 
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
 
- Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
 
static const int LOGLEVEL_DEBUG
 
static const int LOGLEVEL_INFO
 
static const int LOGLEVEL_WARNING
 
static const int LOGLEVEL_ERROR
 
- Static Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Constructor & Destructor Documentation

◆ gThread()

gThread::gThread ( )

◆ ~gThread()

virtual gThread::~gThread ( )
virtual

Member Function Documentation

◆ detach()

void gThread::detach ( )

◆ getId()

std::thread::id gThread::getId ( ) const

◆ getThread()

std::thread & gThread::getThread ( )

◆ isCurrent()

bool gThread::isCurrent ( )

◆ isDone()

bool gThread::isDone ( )

◆ isRunning()

bool gThread::isRunning ( )

◆ lock()

bool gThread::lock ( )

◆ sleep() [1/2]

void gThread::sleep ( double  milliseconds)

◆ sleep() [2/2]

void gThread::sleep ( std::chrono::duration< double, std::milli >  milliseconds)

◆ start()

void gThread::start ( )

◆ stop()

void gThread::stop ( )

◆ threadFunction()

virtual void gThread::threadFunction ( )
virtual

Reimplemented in gGUIAppThread, and gAssetLoader.

◆ tryLock()

bool gThread::tryLock ( )

◆ unlock()

void gThread::unlock ( )

◆ wait()

void gThread::wait ( )

◆ yield()

void gThread::yield ( )

Member Data Documentation

◆ conditionvariable

std::condition_variable gThread::conditionvariable
protected

◆ isdone

bool gThread::isdone
protected

◆ isrunning

bool gThread::isrunning
protected

◆ mutex

std::mutex gThread::mutex
mutableprotected

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