home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 1.0 KB | 33 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWThrdUt.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- // Thread Utilities
- //
- //========================================================================================
-
- #ifndef _ODF_Threads_Utilities_
- #define _ODF_Threads_Utilities_
-
- //-----------------------------------------------------------------------------
- // FW_CThreadCriticalState
- // Enters a critical state and makes sure we exit it if an exception is thrown.
- //-----------------------------------------------------------------------------
-
- class FW_CPrivThreadCriticalState {
- public:
- FW_DECLARE_AUTO (FW_CPrivThreadCriticalState)
- FW_CPrivThreadCriticalState ();
- ~FW_CPrivThreadCriticalState ();
- void SetThreadStateEndCritical (ThreadID theThread, ThreadState newState, ThreadID suggestedThread);
- private:
- ThreadID fCurrentThread;
- FW_Boolean fIsCritical;
- };
-
- #endif // _ODF_Threads_Utilities_
-
-