Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::NullMutex Class Reference

#include <Mutex.h>

Public Types

using ScopedLock = Poco::ScopedLock<NullMutex>
 

Public Member Functions

 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.
 

Detailed Description

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

Definition at line 216 of file Mutex.h.

Member Typedef Documentation

◆ ScopedLock

Definition at line 224 of file Mutex.h.

Constructor & Destructor Documentation

◆ NullMutex()

Poco::NullMutex::NullMutex ( )
inline

Creates the NullMutex.

Definition at line 226 of file Mutex.h.

◆ ~NullMutex()

Poco::NullMutex::~NullMutex ( )
inline

Destroys the NullMutex.

Definition at line 231 of file Mutex.h.

Member Function Documentation

◆ lock() [1/2]

void Poco::NullMutex::lock ( )
inline

Does nothing.

Definition at line 236 of file Mutex.h.

◆ lock() [2/2]

void Poco::NullMutex::lock ( long )
inline

Does nothing.

Definition at line 241 of file Mutex.h.

◆ tryLock() [1/2]

bool Poco::NullMutex::tryLock ( )
inline

Does nothing and always returns true.

Definition at line 246 of file Mutex.h.

◆ tryLock() [2/2]

bool Poco::NullMutex::tryLock ( long )
inline

Does nothing and always returns true.

Definition at line 252 of file Mutex.h.

◆ unlock()

void Poco::NullMutex::unlock ( )
inline

Does nothing.

Definition at line 258 of file Mutex.h.


The documentation for this class was generated from the following file: