Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::NamedMutex Class Reference

#include <NamedMutex.h>

Inheritance diagram for Poco::NamedMutex:
Collaboration diagram for Poco::NamedMutex:

List of all members.

Public Types

typedef Poco::ScopedLock
< NamedMutex

Public Member Functions

void lock ()
 destroys the Mutex.
 NamedMutex (const std::string &name)
bool tryLock ()
void unlock ()
 ~NamedMutex ()
 creates the Mutex.

Private Member Functions

void lockImpl ()
void lockImpl ()
void lockImpl ()
void lockImpl ()
 NamedMutex ()
 NamedMutex (const NamedMutex &)
NamedMutexoperator= (const NamedMutex &)
bool tryLockImpl ()
bool tryLockImpl ()
bool tryLockImpl ()
bool tryLockImpl ()
void unlockImpl ()
void unlockImpl ()
void unlockImpl ()
void unlockImpl ()

Detailed Description

A NamedMutex (mutual exclusion) is a global synchronization mechanism used to control access to a shared resource in a concurrent (multi process) scenario. Using the ScopedLock class is the preferred way to automatically lock and unlock a mutex.

Unlike a Mutex or a FastMutex, which itself is the unit of synchronization, a NamedMutex refers to a named operating system resource being the unit of synchronization. In other words, there can be multiple instances of NamedMutex referring to the same actual synchronization object.

There should not be more than one instance of NamedMutex for a given name in a process. Otherwise, the instances may interfere with each other.

Definition at line 61 of file NamedMutex.h.

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

Generated by  Doxygen 1.6.0   Back to index