Library: Foundation
Package: Threading
Header: Poco/Mutex.h
A NullMutex is an simple 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 to switch between thread-safe and not thread-safe implementations.
Member Functions: lock, tryLock, unlock
typedef Poco::ScopedLock < NullMutex > ScopedLock;
NullMutex();
Creates the NullMutex.
~NullMutex();
Destroys the NullMutex.
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.