LibreOffice Module comphelper (master) 1
|
This class is usable with rtl::Reference. More...
#include <asyncnotification.hxx>
Public Member Functions | |
AsyncEventNotifier (char const *name) | |
constructs a notifier thread More... | |
virtual void SAL_CALL | terminate () override |
terminates the thread More... | |
![]() | |
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... | |
![]() | |
Thread (char const *name) | |
void | launch () |
![]() | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Private Member Functions | |
virtual SAL_DLLPRIVATE | ~AsyncEventNotifier () override |
virtual SAL_DLLPRIVATE void | execute () override |
Additional Inherited Members | |
![]() | |
static void * | operator new (std::size_t size) |
static void | operator delete (void *pointer) |
![]() | |
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) |
![]() | |
virtual SAL_DLLPRIVATE | ~AsyncEventNotifierBase () |
virtual SAL_DLLPRIVATE void | execute () |
![]() | |
virtual | ~Thread () SAL_OVERRIDE |
virtual void | execute ()=0 |
![]() | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
![]() | |
std::unique_ptr< EventNotifierImpl > | m_xImpl |
![]() | |
oslInterlockedCount | m_nCount |
This class is usable with rtl::Reference.
As always, the thread must be joined somewhere.
Definition at line 145 of file asyncnotification.hxx.
|
overrideprivatevirtual |
Definition at line 150 of file asyncnotification.cxx.
comphelper::AsyncEventNotifier::AsyncEventNotifier | ( | char const * | name | ) |
constructs a notifier thread
name | the thread name, see ::osl_setThreadName; must not be null |
Definition at line 145 of file asyncnotification.cxx.
References name.
|
overrideprivatevirtual |
Implements salhelper::Thread.
Definition at line 154 of file asyncnotification.cxx.
References comphelper::AsyncEventNotifierBase::execute().
|
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().