diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-23 10:37:09 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-23 10:47:37 +0100 |
commit | 2eaa1422a032d6a7ffc72a2abeb3dd3e6248a263 (patch) | |
tree | a8a618394c09b21cd189a4f9f221557dc5fc628a /dbaccess | |
parent | 40d21ab3c75a7c18de940162563015ae80136709 (diff) |
Adapted AsyncEventNotifier to safer-to-use salhelper::Thread
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/documenteventnotifier.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx index 24a46a2e776d..2b7cf9ba33cb 100644 --- a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx +++ b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx @@ -166,7 +166,7 @@ namespace dbaccess m_pEventBroadcaster->removeEventsForProcessor( this ); m_pEventBroadcaster->terminate(); m_pEventBroadcaster->join(); - m_pEventBroadcaster = NULL; + m_pEventBroadcaster.clear(); } lang::EventObject aEvent( m_rDocument ); @@ -190,7 +190,7 @@ namespace dbaccess m_bInitialized = true; if ( m_pEventBroadcaster.is() ) // there are already pending asynchronous events - m_pEventBroadcaster->create(); + m_pEventBroadcaster->launch(); } void DocumentEventNotifier_Impl::impl_notifyEvent_nothrow( const DocumentEvent& _rEvent ) @@ -220,11 +220,12 @@ namespace dbaccess { if ( !m_pEventBroadcaster.is() ) { - m_pEventBroadcaster.set( new ::comphelper::AsyncEventNotifier ); + m_pEventBroadcaster.set( + new ::comphelper::AsyncEventNotifier("DocumentEventNotifier")); if ( m_bInitialized ) // start processing the events if and only if we (our document, respectively) are // already initialized - m_pEventBroadcaster->create(); + m_pEventBroadcaster->launch(); } m_pEventBroadcaster->addEvent( new DocumentEventHolder( _rEvent ), this ); } |