=====================================================
Developed by Salmaso Raffaele <r.salmaso@flashnet.it>
=====================================================
VDKThread class <vdk/vdkthread.h>

DESCRIPTION
This class provides a simple thread impl. Actually is supported only
POSIX THREAD.

ENUM
VDKTHREAD_IDLE = thread not running;
VDKTHREAD_RUNNING = thread running, returned by Start ();
VDKTHREAD_STOPPED = thread canceled via Stop ();
VDKTHREAD_EXITED = thread exited via Exit ();
VDKTHREAD_CANNOT_CREATE = impossible to create a new thread, returned
by Start ();
VDKTHREAD_IS_YET_RUNNING = the thread is yet running, returned by
Start ();

PUBLIC MEMBER
VDKThreadEnum  state : in what state is the thread?

PROPERTIES
none

METHODS
_ VDKThreadEnum Start (void * arg = NULL);
  start the thread (see below)

_ VDKThreadEnum Stop ();
  stop executing thread (command from other threads)

_ void * Wait ();
  wait until the thread is terminated (it is used from other threads)

_ unsigned long GetID ();
  return the thread ID
  
_ void Exit (void * status = 0);
  exit from thread (protected member, it can be used by own thread)
  
USING THE CLASS
It is possible to use a VDKThread in two way:
_ via subclassing:
  if you derive a new class from VDKThread, you have to override the
  virtual method "virtual void Execute ();" to do what you want
  
  class NewClass : public VDKThread {
  protected:
    void Execute () {
      // my code
    }
    
  public:
    NewClass ();
    ~NewsClass ();
  }
  
  ...
  
  NewClass thread;
  thread.Start();
  
_ passing a pointer to function when calling "Start ( (void *) func);"
  
  void * func () {}
  ...
  VDKThread thread;
  thread.Start ((void *) func);

  
EXAMPLES IN:
in ./example/thread/