LibreOffice Module comphelper (master) 1
Public Member Functions | Private Member Functions | List of all members
comphelper::AsyncEventNotifier Class Referencefinal

This class is usable with rtl::Reference. More...

#include <asyncnotification.hxx>

Inheritance diagram for comphelper::AsyncEventNotifier:
[legend]
Collaboration diagram for comphelper::AsyncEventNotifier:
[legend]

Public Member Functions

 AsyncEventNotifier (char const *name)
 constructs a notifier thread More...
 
virtual void SAL_CALL terminate () override
 terminates the thread More...
 
- Public Member Functions inherited from comphelper::AsyncEventNotifierBase
 AsyncEventNotifierBase ()
 
virtual void SAL_CALL terminate ()
 terminates the thread More...
 
void addEvent (const AnyEventRef &_rEvent, const ::rtl::Reference< IEventProcessor > &_xProcessor)
 adds an event to the queue, together with the instance which is responsible for processing it More...
 
void removeEventsForProcessor (const ::rtl::Reference< IEventProcessor > &_xProcessor)
 removes all events for the given event processor from the queue More...
 
- Public Member Functions inherited from salhelper::Thread
 Thread (char const *name)
 
void launch ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

virtual SAL_DLLPRIVATE ~AsyncEventNotifier () override
 
virtual SAL_DLLPRIVATE void execute () override
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::Thread
static void * operator new (std::size_t size)
 
static void operator delete (void *pointer)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from comphelper::AsyncEventNotifierBase
virtual SAL_DLLPRIVATE ~AsyncEventNotifierBase ()
 
virtual SAL_DLLPRIVATE void execute ()
 
- Protected Member Functions inherited from salhelper::Thread
virtual ~Thread () SAL_OVERRIDE
 
virtual void execute ()=0
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from comphelper::AsyncEventNotifierBase
std::unique_ptr< EventNotifierImplm_xImpl
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

This class is usable with rtl::Reference.

As always, the thread must be joined somewhere.

Definition at line 145 of file asyncnotification.hxx.

Constructor & Destructor Documentation

◆ ~AsyncEventNotifier()

comphelper::AsyncEventNotifier::~AsyncEventNotifier ( )
overrideprivatevirtual

Definition at line 150 of file asyncnotification.cxx.

◆ AsyncEventNotifier()

comphelper::AsyncEventNotifier::AsyncEventNotifier ( char const *  name)

constructs a notifier thread

Parameters
namethe thread name, see ::osl_setThreadName; must not be null

Definition at line 145 of file asyncnotification.cxx.

References name.

Member Function Documentation

◆ execute()

void comphelper::AsyncEventNotifier::execute ( )
overrideprivatevirtual

◆ terminate()

void comphelper::AsyncEventNotifier::terminate ( )
overridevirtual

terminates the thread

Note that this is a cooperative termination - if you call this from a thread different from the notification thread itself, then it will block until the notification thread finished processing the current event. If you call it from the notification thread itself, it will return immediately, and the thread will be terminated as soon as the current notification is finished.

Reimplemented from comphelper::AsyncEventNotifierBase.

Definition at line 159 of file asyncnotification.cxx.

References comphelper::AsyncEventNotifierBase::terminate().


The documentation for this class was generated from the following files: