Type: info
Title: new: ::comphelper::SharedMutex
Posted by: [EMAIL PROTECTED]
Affected: -
Effective from: CWS dba31e
CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/dba31e>
CWS status: new
*Summary*
--------
+ <comphelper/sharedmutex.hxx>
+ ::comphelper::SharedMutex
+ ::comphelper::SharedMutexBase
*Description*
-------------
SharedMutex, declared in namespace comphelper, in include file
comphelper/sharedmutex.hxx, is a class wrapping an ::osl::Mutex, using
a boost::shared_ptr. It is intended to be used when you have multiple
classes which need to, well, share a single mutex instances for thread
safety.
Syntactically, the class behaves like the ::osl::Mutex does, so you
can just declare a "::comphelper::SharedMutex m_aMutex", and use it in
e.g. "::osl::MutexGuard aGuard( m_aMutex )" statements.
SharedMutexBase is intended to replace the ::cppu::BaseMutex class in
a scenario where you need a SharedMutex instead of a Mutex. That is,
the only member of a SharedMutexBase is a SharedMutex, where you
derive from SharedMutexBase when you need to pass a SharedMutex (or
Mutex) reference to some other base class (which wouldn't be possible
when the SharedMutex were a direct member of your class, since class
members are initialized *after* base classes are).
Send feedback to [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]