Public Member Functions | |
PROUD_API | CriticalSection () |
PROUD_API | CriticalSection (CriticalSectionSettings &settings) |
PROUD_API | ~CriticalSection (void) |
PROUD_API void | Lock () |
void | UnsafeLock () |
PROUD_API void | Unlock () |
PROUD_API bool | TryLock () |
bool | IsValid () |
CRITICAL_SECTION * | GetWin32Object () const |
bool | IsLockedByCurrentThread () const |
bool | IsLocked () const |
PROUD_API void | Reset (CriticalSectionSettings &settings) |
void | ShowErrorOnInvalidState () |
uint64_t | GetLastLockedThreadID () |
Public Attributes | |
bool | m_neverCallDtor |
int | m_tryLockSuccessCount |
int | m_tryLockFailCount |
CRITICAL_SECTION * | m_platformSpecificObject |
Critical section (class)
PROUD_API Proud::CriticalSection::CriticalSection | ( | ) |
Initializes a critical section object.
PROUD_API Proud::CriticalSection::CriticalSection | ( | CriticalSectionSettings & | settings | ) |
Initializes a critical section object.
PROUD_API Proud::CriticalSection::~CriticalSection | ( | void | ) |
Destroyer
|
inline |
returns ID of the thread where the last acquire (lock) is done.
You must set Proud.CriticalSectionSettings.m_updateLastLockedThreadID to true before using this function.
NOTE: on unix, this is pthread_t value. This may differ from thread ID shown in debugger.
NOTE: This value does not set to zero if last unacquire (unlock) is done.
|
inline |
Returns CRITICAL_SECTION object for Windows platform. Useful for getting LockCount or OwningThread value.
bool Proud::CriticalSection::IsLocked | ( | ) | const |
Returns true if this is locked by any thread.
bool Proud::CriticalSection::IsLockedByCurrentThread | ( | ) | const |
Returns true if this is locked by current thread.
PROUD_API void Proud::CriticalSection::Lock | ( | ) |
The critical section is to be occupied by the thread calling this method.
PROUD_API bool Proud::CriticalSection::TryLock | ( | ) |
Use TryEnterCriticalSection rather than EnterCriticalSection.
PROUD_API void Proud::CriticalSection::Unlock | ( | ) |
The critical section is to be relieved by the thread calling this method.
void Proud::CriticalSection::UnsafeLock | ( | ) |
TODO:translate needed. The critical section is to be occupied by the thread calling this method.
CRITICAL_SECTION* Proud::CriticalSection::m_platformSpecificObject |
여러분이 디버거에서 이 내부 상태값을 보고 싶으시면 이 멤버 변수의 값을 확인하십시오.