home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Thread.h
-
- Contains: An abstract class for threads
-
- Written by: Steve Sisak
-
- Copyright: © 1995 by Steve Sisak, all rights reserved.
-
- Change History (most recent first):
-
- */
- #ifndef __THREADCONTEXT__
- #define __THREADCONTEXT__
-
- #include "LinkedListOfObject.h"
-
- class TThread;
-
- class ThreadContext : private ListLink
- {
- protected:
- TThread* fThread;
-
- public:
- ThreadContext();
- ThreadContext(TThread& aThread);
- virtual ~ThreadContext();
-
- virtual void SwitchIn(void);
- virtual void SwitchOut(void);
- virtual void Terminate(void);
-
- // Need to ask MW how to call destructors if thread is terminated
-
- private: // required overrides for TListLink
- LinkedList* GetList();
- void* GetObjectPtr();
- };
-
-
- #endif // __THREADCONTEXT__
-