WorkerThread.inl
上传用户:royluo
上传日期:2007-01-05
资源大小:1584k
文件大小:2k
源码类别:

游戏

开发平台:

Visual C++

  1. /*****************************************************************************
  2. *                                                                             
  3. *   WorkerThread.inl
  4. *                                                                             
  5. *   Electrical Engineering Faculty - Software Lab                             
  6. *   Spring semester 1998                                                      
  7. *                                                                             
  8. *   Tanks game                                                                
  9. *                                                                             
  10. *   Contents: Inline functions implementations.
  11. *                                                                             
  12. *   Authors: Eran Yariv - 28484475                                           
  13. *            Moshe Zur  - 24070856                                           
  14. *                                                                            
  15. *                                                                            
  16. *   Date: 23/09/98                                                           
  17. *                                                                            
  18. ******************************************************************************/
  19. inline
  20. CWorkerThread::CWorkerThread () : m_bThreadIsRunning(FALSE)
  21.     {}
  22. inline
  23. CWorkerThread::~CWorkerThread () 
  24. {
  25.     if (m_bThreadIsRunning) {
  26.         EndWorkerThread(TRUE);
  27.     }
  28. }
  29. inline BOOL
  30. CWorkerThread::SetPriority (int prio)
  31. {
  32.     if (!m_bThreadIsRunning)
  33.         return FALSE;   // Thread not running
  34.     return SetThreadPriority (m_hThread, prio);
  35. }