criticalsection

How can I implement a thread-safe list wrapper in Delphi?

I have a list wrapper that maintains two Tstringlists and a TClassList I need this to be thread safe, such that: Concurrent writes are not allowed (wait state of some sort should be entered) Reading while writing (or vice versa) is not allowed (wait state of some sort should be entered) Concurrent reads are allowed Any ideas on how ...

Is there a difference between Boost's scoped mutex and WinAPi's critical section?

The title says it all. In Windows environment, is Boost's scoped mutex using WinAPI's critical sections, or something else? ...

How to initial static member in c++ using function?

I am using c++; in .h: static CRITICAL_SECTION g_CS; in .cpp: CRITICAL_SECTION CQCommon::g_CS; but I want to use QGUID temp; EnterCriticalSection(&g_CS); temp = g_GUID++; LeaveCriticalSection(&g_CS); return temp; in one static function. How can I invoke InitializeCriticalSection(PCRITICAL_SECTION pcs); C...