class Poco::NullMutex
Overview
A NullMutex is an empty mutex implementation which performs no locking at all. Moreā¦
#include <Mutex.h> class NullMutex { public: // typedefs typedef Poco::ScopedLock<NullMutex> ScopedLock; // methods void lock(); void lock(long); bool tryLock(); bool tryLock(long); void unlock(); };
Detailed Documentation
A NullMutex is an empty mutex implementation which performs no locking at all.
Useful in policy driven design where the type of mutex used can be now a template parameter allowing the user to switch between thread-safe and not thread-safe depending on his need Works with the ScopedLock class
Methods
void lock()
Does nothing.
void lock(long)
Does nothing.
bool tryLock()
Does nothing and always returns true.
bool tryLock(long)
Does nothing and always returns true.
void unlock()
Does nothing.