1 #ifndef Protium_ThreadingPolicy_h_
2 #define Protium_ThreadingPolicy_h_
63 template<
class Host,
class MutexPolicy=Mutex>
79 template<
class Host,
class MutexPolicy=Mutex>
130 template<
class Host,
class MutexPolicy=Mutex>
134 static struct Initializer{
143 Initializer() : fIsInit(
false), fMtx()
193 template <
class Host,
class MutexPolicy >
194 typename StaticLocked< Host, MutexPolicy >::Initializer
200 #endif //File Guardian
Lock & operator=(const Lock &)
No Assignment locking.
Use to specify instance-locked items.
Prototype of threading policy.
Use to specify non-thread safe classes.
Use to specify objects which lock by class.
Lock & operator=(const Lock &)
Lock(const StaticLocked &)
For COmpatibility with instance locked.
Lock()
No default Locking.
InstanceLocked()
Defaults to Mutex being unlocked.
const InstanceLocked & fHost
Reference to hosted class.
Lock on instance creation uses the static initializer to lock all instances of host.
Lock(const Lock &)
No Copy locking.
Lock(const InstanceLocked &host)
Lock on host when constructed.
static struct Protium::Threads::StaticLocked::Initializer fInitializer
~InstanceLocked()
Destruction unlocks class.
Lock(const InSingleThread &)
For instance locking.
Host VolatileType
Use to access Host class from derived templates.
Lock()
On creation, does nothing.
InstanceLocked(const InstanceLocked &)
On copy, the copy instance is unlocked.
Lock(const StaticLocked *)
For compatibility with instance locked.
Defines mutexes and policies to be used by threaded objects.
MutexPolicy fMtx
Contains the mutex used to lock this class.
Lock(const InSingleThread *)
For static locking.
Lock(const InstanceLocked *host)
Lock on host pointer when constructed.
~Lock()
Unlock on destruction.
Dummy internal class which locks nothing.