summaryrefslogtreecommitdiffstats
path: root/comphelper/source/misc/asyncnotification.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/asyncnotification.cxx')
-rw-r--r--comphelper/source/misc/asyncnotification.cxx37
1 files changed, 3 insertions, 34 deletions
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index cf8b6286d97b..216cdb2f765f 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -142,8 +142,8 @@ namespace comphelper
//= AsyncEventNotifier
//====================================================================
//--------------------------------------------------------------------
- AsyncEventNotifier::AsyncEventNotifier()
- :m_pImpl( new EventNotifierImpl )
+ AsyncEventNotifier::AsyncEventNotifier(char const * name):
+ Thread(name), m_pImpl(new EventNotifierImpl)
{
}
@@ -191,13 +191,8 @@ namespace comphelper
}
//--------------------------------------------------------------------
- void AsyncEventNotifier::run()
+ void AsyncEventNotifier::execute()
{
- acquire();
-
- // keep us alive, in case we're terminated in the mid of the following
- ::rtl::Reference< AsyncEventNotifier > xKeepAlive( this );
-
do
{
AnyEventRef aNextEvent;
@@ -248,32 +243,6 @@ namespace comphelper
while ( sal_True );
}
- //--------------------------------------------------------------------
- void SAL_CALL AsyncEventNotifier::onTerminated()
- {
- Thread::onTerminated();
- // when we were started (->run), we aquired ourself. Release this now
- // that we were finally terminated
- release();
- }
-
- //--------------------------------------------------------------------
- oslInterlockedCount SAL_CALL AsyncEventNotifier::acquire()
- {
- return osl_incrementInterlockedCount( &m_pImpl->m_refCount );
- }
-
- //--------------------------------------------------------------------
- oslInterlockedCount SAL_CALL AsyncEventNotifier::release()
- {
- if ( 0 == osl_decrementInterlockedCount( &m_pImpl->m_refCount ) )
- {
- delete this;
- return 0;
- }
- return m_pImpl->m_refCount;
- }
-
//........................................................................
} // namespace comphelper
//........................................................................