diff options
Diffstat (limited to 'comphelper/inc/comphelper/asyncnotification.hxx')
-rw-r--r-- | comphelper/inc/comphelper/asyncnotification.hxx | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/comphelper/inc/comphelper/asyncnotification.hxx b/comphelper/inc/comphelper/asyncnotification.hxx index e7d5ac38ff3b..0ca35a3bf2a5 100644 --- a/comphelper/inc/comphelper/asyncnotification.hxx +++ b/comphelper/inc/comphelper/asyncnotification.hxx @@ -29,12 +29,13 @@ #ifndef COMPHELPER_ASYNCNOTIFICATION_HXX #define COMPHELPER_ASYNCNOTIFICATION_HXX -#include <osl/thread.hxx> -#include <rtl/ref.hxx> -#include <comphelper/comphelperdllapi.h> -#include <rtl/alloc.h> +#include "sal/config.h" -#include <memory> +#include "boost/scoped_ptr.hpp" +#include "comphelper/comphelperdllapi.h" +#include "rtl/ref.hxx" +#include "sal/types.h" +#include "salhelper/thread.hxx" //........................................................................ namespace comphelper @@ -109,26 +110,25 @@ namespace comphelper events in the queue. As soon as you add an event, the thread is woken up, processes the event, and sleeps again. */ - class COMPHELPER_DLLPUBLIC AsyncEventNotifier :public ::osl::Thread - ,public ::rtl::IReference + class COMPHELPER_DLLPUBLIC AsyncEventNotifier: public salhelper::Thread { friend struct EventNotifierImpl; private: - ::std::auto_ptr< EventNotifierImpl > m_pImpl; + boost::scoped_ptr< EventNotifierImpl > m_pImpl; + + SAL_DLLPRIVATE virtual ~AsyncEventNotifier(); // Thread - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); + SAL_DLLPRIVATE virtual void execute(); public: /** constructs a notifier thread - */ - AsyncEventNotifier(); - // IReference implementations - virtual oslInterlockedCount SAL_CALL acquire(); - virtual oslInterlockedCount SAL_CALL release(); + @param name the thread name, see ::osl_setThreadName; must not be + null + */ + AsyncEventNotifier(char const * name); /** terminates the thread @@ -156,9 +156,6 @@ namespace comphelper /** removes all events for the given event processor from the queue */ void removeEventsForProcessor( const ::rtl::Reference< IEventProcessor >& _xProcessor ); - - protected: - virtual ~AsyncEventNotifier(); }; //==================================================================== |