Changeset 7847 in orxonox.OLD for trunk/src/lib/util/threading.h
- Timestamp:
- May 25, 2006, 1:12:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.