Changeset 7847 in orxonox.OLD for trunk/src/lib/util
- Timestamp:
- May 25, 2006, 1:12:30 AM (19 years ago)
- Location:
- trunk/src/lib/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/util/threading.cc
r7737 r7847 27 27 * @todo this constructor is not jet implemented - do it 28 28 */ 29 Thread::Thread()30 {31 }29 // Thread::Thread() 30 // { 31 // } 32 32 33 33 … … 35 35 * standard deconstructor 36 36 */ 37 Thread::~Thread()38 {39 // delete what has to be deleted here40 }37 // Thread::~Thread() 38 // { 39 // // delete what has to be deleted here 40 // } 41 41 42 42 } -
trunk/src/lib/util/threading.h
r7737 r7847 22 22 23 23 public: 24 Thread(); 25 virtual ~Thread(); 24 Thread(int (*fn)(void *), void *data) { this->thread = SDL_CreateThread(fn, data); }; 25 virtual ~Thread() { SDL_KillThread(this->thread); } 26 void exit ( int returnCode = 0 ); 27 bool isFinished () const; 28 bool isRunning () const; 29 void wait() { SDL_WaitThread(this->thread, NULL); }; 30 31 void start(); 32 void terminate(); 26 33 27 34 28 35 private: 36 SDL_Thread* thread; 29 37 30 38 };
Note: See TracChangeset
for help on using the changeset viewer.