summaryrefslogtreecommitdiff
path: root/framework/inc/threadhelp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-12-16 10:53:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-12-16 14:21:26 +0100
commita2016848005b3ed9430575f6401bfec25f354dfa (patch)
treeaedfac24477ec3818848b6cacc77ad089d6bda2d /framework/inc/threadhelp
parent4ac13fb72a12ac6dba7b002a4ac0cdd40eaaada5 (diff)
Remove comment noise
Change-Id: I7794e40e07520c1e504b1167aa64cf24819271f2
Diffstat (limited to 'framework/inc/threadhelp')
-rw-r--r--framework/inc/threadhelp/transactionguard.hxx41
1 files changed, 4 insertions, 37 deletions
diff --git a/framework/inc/threadhelp/transactionguard.hxx b/framework/inc/threadhelp/transactionguard.hxx
index 52ee098e0720..0b87721d949a 100644
--- a/framework/inc/threadhelp/transactionguard.hxx
+++ b/framework/inc/threadhelp/transactionguard.hxx
@@ -25,59 +25,26 @@
namespace framework{
-/*-************************************************************************************************************
- @short implement a guard to support non breakable transactions
- @descr If you wish to support non breakable method calls without locking any mutex, rw-lock or
- something like that - you should use this guard implementation.
- Initialize it at first in your method and don't release it till end of your function!
- Your "transaction" is registered in ctor and automatically released in dtor.
- Use set/get of working mode to enable/disable further transactions.
- It's possible too, to enable automatically throwing of some exceptions for illegal
- transaction requests ... e.g. interface call for already disposed objects.
-
- @attention To prevent us against wrong using, the default ctor, copy ctor and the =operator are marked private!
- @devstatus draft
-*//*-*************************************************************************************************************/
class TransactionGuard : private boost::noncopyable
{
-
- // public methods
-
public:
-
- /*-****************************************************************************************************
- @short ctors
- @descr Use these ctor methods to initialize the guard right.
- Given reference must be valid - otherwise crashes could occur!
-
- @attention It's not necessary to lock any mutex here! Because a ctor should not be called
- from different threads at the same time ... this class use no refcount mechanism!
- @param "rManager" reference to transaction manager for using to register a request
- @param "eMode" enable/disable throwing of exceptions for rejected calls
- *//*-*****************************************************************************************************/
inline TransactionGuard( TransactionManager& rManager, EExceptionMode eMode )
: m_pManager( &rManager )
{
m_pManager->registerTransaction( eMode );
}
- /*-************************************************************************************************************
- @short dtor
- @descr We must release the transaction manager and can forget his pointer.
- *//*-*************************************************************************************************************/
inline ~TransactionGuard()
{
m_pManager->unregisterTransaction();
}
private:
+ TransactionManager* m_pManager;
+};
- TransactionManager* m_pManager; /// pointer to safed transaction manager
-
-}; // class TransactionGuard
-
-} // namespace framework
+}
-#endif // INCLUDED_FRAMEWORK_INC_THREADHELP_TRANSACTIONGUARD_HXX
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */