Tulip_Thread

In the Tulip Thread package, Threads are C++ objects.  To define and create a thread,  an application specialize the base Tulip_Thread
by defining the virtual "run" method which is the work that the thread does.  This model is based on AWESIME and Java Thread packages.  Arguments required by the thread object are pass as arguments to the constructor and stored as a object member which
is then used by the "run" method when the Tulip Thread scheduler invokes this method. Below is the public interface for the Tulip_thread object. 

Class Definition

 
class Tulip_Thread {
  public:
     bool isAlive();
     void suspend();
     void resume();

     int getThreadID() 
     virtual void run() = 0;
     void start();

     // Ceases execution of the thread.  
     void stop(void *status);

     // Yields the processesor to a ready thread
     virtual void yield();
     // Yields the processesor to a ready thread
     virtual void yield(Tulip_ThreadPtr);

     // Join waits for the completion of the specified thread
     void join(const Tulip_Thread &withThread);
     virtual ~Tulip_Thread();
 
 };

Examples 
Suvas Vajracharya