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

 ~Thread ()

~Thread

[virtual]

inline void  start ()

start

starts the run() method in a thread

inline void  waitDone ()

waitDone

waits until the thread is executed completely

void  run ()

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 on stefan on Sat Jun 2 23:13:28 2001, using kdoc 2.0a53.