class Thread

A thread of execution More...

Contains pure virtuals
Full nameArts::Thread
Definition#include <arts/thread.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

A thread of execution

Example for implementing a thread:


 class Counter : public Arts::Thread 
 {
 public:
   void run() {
     for(int i = 0;i < 10;i++)
     {
       printf("%d\n",i+1);
       sleep(1);
     }
   }
 };            // start the thread with Counter c; c.start();

 Thread ()

 ~Thread ()

[virtual]

inline void  start ()

starts the run() method in a thread

inline void  waitDone ()

waits until the thread is executed completely

void  run ()

[pure virtual]

implement this method, if you want to create an own thread - then you can simply call thread.start() to start execution of run() in a seperate thread


Generated by: stefan@stefan on Sat Feb 24 19:11:23 2001, using kdoc 2.0a47.