TStaticSync provides a system-independent interface to build sets of classes that act somewhat like monitors, i.e., classes in which only one member function can execute at any one time regardless of which instance it is being called on.
More...
#include <owl/thread.h>
|
| typedef TLock | Lock |
| | For compatibility with old T-less typename.
|
template<class T>
class owl::TStaticSync< T >
TStaticSync provides a system-independent interface to build sets of classes that act somewhat like monitors, i.e., classes in which only one member function can execute at any one time regardless of which instance it is being called on.
TStaticSync uses TCriticalSection, so it is portable to all platforms that TCriticalSection has been ported to. Example
{
public:
void f();
void g();
private:
static int i;
};
void ThreadSafe::f()
{
if (i == 2)
i = 3;
}
void ThreadSafe::g()
{
if (i == 3)
i = 2;
}
Definition at line 512 of file thread.h.
◆ Lock
For compatibility with old T-less typename.
Definition at line 525 of file thread.h.
◆ TStaticSync() [1/2]
◆ TStaticSync() [2/2]
◆ ~TStaticSync()
◆ operator=()
◆ TLock
The documentation for this class was generated from the following file: