source: trunk/MagicSoft/Cosy/base/MThread.h@ 910

Last change on this file since 910 was 910, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 515 bytes
Line 
1#ifndef MTHREAD_H
2#define MTHREAD_H
3
4#include <pthread.h>
5
6class MThread
7{
8private:
9 bool fIsRunning;
10 bool fIsDetached;
11 bool fStop;
12
13 pthread_t *fThread;
14
15 void *fReturn;
16
17 int fPriority;
18
19 static void *MapThread(void *arg);
20 void *RunThread();
21 virtual void *Thread() = 0;
22
23public:
24 MThread(bool start=true);
25 virtual ~MThread();
26
27 bool SetPriority(int prio);
28
29 void Detach();
30
31 void Start();
32 void Stop();
33
34 bool HasStopFlag() const { return fStop; }
35};
36
37#endif
Note: See TracBrowser for help on using the repository browser.