#include <timeout_assertion_thread.h>
Inheritance diagram for CTimeoutAssertionThread:
Public Types | |
enum | TControl { ACTIVE, INACTIVE, QUIT } |
Public Member Functions | |
void | activate () |
CTimeoutAssertionThread (uint32 timeout=0) | |
void | desactivate () |
virtual void | getName (std::string &result) const |
void | quit () |
void | run () |
void | timeout (uint32 to) |
Private Attributes | |
volatile TControl | _Control |
volatile uint32 | _Counter |
volatile uint32 | _Timeout |
|
Definition at line 56 of file timeout_assertion_thread.h.
|
|
Definition at line 58 of file timeout_assertion_thread.h. References _Control, _Counter, INACTIVE, and uint32.
|
|
Definition at line 86 of file timeout_assertion_thread.h. References _Control, _Counter, ACTIVE, INACTIVE, nlassert, and QUIT. Referenced by NLNET::IService::main().
|
|
Definition at line 95 of file timeout_assertion_thread.h. References _Control, ACTIVE, INACTIVE, nlassert, and QUIT. Referenced by NLNET::IService::main().
|
|
Reimplemented in NL3D::CAsyncFileManager3D::CMeshLoad, NL3D::CAsyncFileManager3D::CIGLoad, NL3D::CAsyncFileManager3D::CIGLoadUser, NL3D::CAsyncFileManager3D::CTextureLoad, NL3D::CZoneLoadingTask, NLPACS::CGlobalRetriever::CLrLoader, NLMISC::CAsyncFileManager::CFileLoad, NLMISC::CAsyncFileManager::CMultipleFileLoad, and NLMISC::CAsyncFileManager::CSignal. Definition at line 74 of file thread.h. Referenced by NLMISC::CTaskManager::run().
00075 {
00076 result = "NoName";
00077 }
|
|
Definition at line 103 of file timeout_assertion_thread.h. References _Control, nlassert, and QUIT.
|
|
Implements NLMISC::IRunnable. Definition at line 62 of file timeout_assertion_thread.h. References _Control, _Counter, ACTIVE, nlassert, NLMISC::nlSleep(), QUIT, and uint32.
00063 { 00064 uint32 lastCounter; 00065 while(_Control != QUIT) 00066 { 00067 if(_Control != ACTIVE || _Timeout == 0) 00068 { 00069 //nldebug("not active, sleep"); 00070 NLMISC::nlSleep(1000); 00071 } 00072 else 00073 { 00074 //nldebug("active, enter sleep"); 00075 lastCounter = _Counter; 00076 NLMISC::nlSleep(_Timeout); 00077 //nldebug("active, leave sleep, test assert"); 00078 00079 // If this assert occured, it means that a checked part of the code was 00080 // to slow and then I decided to assert to display the problem. 00081 nlassert(!(_Control==ACTIVE && _Counter==lastCounter)); 00082 } 00083 } 00084 } |
|
Definition at line 110 of file timeout_assertion_thread.h. References uint32. Referenced by NLNET::UpdateAssertionThreadTimeoutCB().
00111 { 00112 _Timeout = to; 00113 //nldebug("change timeout to %d", to); 00114 } |
|
Definition at line 117 of file timeout_assertion_thread.h. Referenced by activate(), CTimeoutAssertionThread(), desactivate(), quit(), and run(). |
|
Definition at line 118 of file timeout_assertion_thread.h. Referenced by activate(), CTimeoutAssertionThread(), and run(). |
|
Definition at line 119 of file timeout_assertion_thread.h. |