Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7847 in orxonox.OLD for trunk/src/lib/util/threading.h


Ignore:
Timestamp:
May 25, 2006, 1:12:30 AM (18 years ago)
Author:
bensch
Message:

trunk: some minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/threading.h

    r7737 r7847  
    2222
    2323  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();
    2633
    2734
    2835  private:
     36    SDL_Thread* thread;
    2937
    3038  };
Note: See TracChangeset for help on using the changeset viewer.