Forum Navigation
CriticalSection
Posted: 11/18/07 11:22:49Hi, I want a thread-safe win32 gui and one of the requirements are CriticalSections?. Like :
// This class is used for thread synchronisation class CCriticalSection { public: this() {InitializeCriticalSection(&m_cs);} ~this() {DeleteCriticalSection(&m_cs);} void Lock() {EnterCriticalSection(&m_cs);} void Release() {LeaveCriticalSection(&m_cs);} private: CRITICAL_SECTION m_cs; }Well I can use this WINAPI functions, but I would prefer to use Tango functions instead. (to leave the chance for a platform independent GUI) Unfortunately I have not found something similar. Ideas ? Many thanks in advance, Bjoern