My Project
Public Member Functions | List of all members
ParaEngine::Thread Class Referenceabstract

cross platform thread. More...

#include <Thread.hpp>

Public Member Functions

 Thread ()
 Constructor.
 
virtual ~Thread ()
 Destructor, Warning, it waits the end of the current thread.
 
bool start ()
 start the thread More...
 
bool isRunning () const
 Fast look up to know if a thread is running. More...
 
bool wait () const
 Wait the end of a thread. More...
 
virtual void run ()=0
 the function is called when thread is starting You must implement this methode!
 
bool kill ()
 

Detailed Description

cross platform thread.

Thread th; th.start(); // start thread ... th.isRunning(); // fast look up ... th.wait(); // wait thread end

All methods may be inline by the compiler

Member Function Documentation

§ isRunning()

bool ParaEngine::Thread::isRunning ( ) const
inline

Fast look up to know if a thread is running.

Returns
true if running else false

§ start()

bool ParaEngine::Thread::start ( )
inline

start the thread

Returns
true if success else false

§ wait()

bool ParaEngine::Thread::wait ( ) const
inline

Wait the end of a thread.

Returns
false in case of error, true if all right

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