Jive reference manual
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
jem::Thread Class Referenceabstract

#include <jem/base/Thread.h>

Inheritance diagram for jem::Thread:
Inheritance graph

Public Member Functions

 Thread ()
 
virtual void run ()=0
 
void start ()
 
void join ()
 
void join (const Time &timeout)
 
void cancel ()
 
bool isCancelled () const
 
bool isAlive () const
 
- Public Member Functions inherited from jem::Object
virtual ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
virtual String toString () const
 Returns a short textual description of this object. More...
 
virtual long hashValue () const
 Returns a hash value for this object. More...
 
virtual bool equals (const Ref< Object > &obj) const
 Tests whether two objects are equal. More...
 
Ref< Objectclone () const
 Returns a copy of this object. More...
 

Static Public Member Functions

static ThreadgetCurrent ()
 
static bool cancelled ()
 
static bool allowCancel (bool enable)
 
static void sleep (const Time &timeout)
 
static int newLocalKey ()
 
static Ref< ObjectgetLocal (int key)
 
static void setLocal (int key, const Ref< Object > &obj)
 
- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 

Static Public Attributes

static const int NULL_KEY = -1
 

Protected Member Functions

virtual ~Thread ()
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 

Friends

class ThreadLib
 
class MainThread
 

Constructor & Destructor Documentation

jem::Thread::Thread ( )
virtual jem::Thread::~Thread ( )
protectedvirtual

Member Function Documentation

virtual void jem::Thread::run ( )
pure virtual
void jem::Thread::start ( )
void jem::Thread::join ( )
void jem::Thread::join ( const Time timeout)
void jem::Thread::cancel ( )
bool jem::Thread::isCancelled ( ) const
bool jem::Thread::isAlive ( ) const
static Thread* jem::Thread::getCurrent ( )
static
static bool jem::Thread::cancelled ( )
static
static bool jem::Thread::allowCancel ( bool  enable)
static
static void jem::Thread::sleep ( const Time timeout)
static
Examples:
game-of-life.cpp.
static int jem::Thread::newLocalKey ( )
static
static Ref<Object> jem::Thread::getLocal ( int  key)
static
static void jem::Thread::setLocal ( int  key,
const Ref< Object > &  obj 
)
static

Friends And Related Function Documentation

friend class ThreadLib
friend
friend class MainThread
friend

Member Data Documentation

const int jem::Thread::NULL_KEY = -1
static