LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CancelJobsThread Class Reference

thread to cancel a give list of cancellable jobs More...

Inheritance diagram for CancelJobsThread:
[legend]
Collaboration diagram for CancelJobsThread:
[legend]

Public Member Functions

 CancelJobsThread (std::list< css::uno::Reference< css::util::XCancellable > > &&rJobs)
 
void addJobs (std::list< css::uno::Reference< css::util::XCancellable > > &rJobs)
 
bool allJobsCancelled () const
 
void stopWhenAllJobsCancelled ()
 

Private Member Functions

bool existJobs () const
 
css::uno::Reference< css::util::XCancellable > getNextJob ()
 
bool stopped () const
 
virtual void SAL_CALL run () override
 

Private Attributes

std::mutex maMutex
 
std::list< css::uno::Reference< css::util::XCancellable > > maJobs
 
bool mbAllJobsCancelled
 
bool mbStopped
 

Detailed Description

thread to cancel a give list of cancellable jobs

helper class for FinalThreadManager

Definition at line 39 of file finalthreadmanager.cxx.

Constructor & Destructor Documentation

◆ CancelJobsThread()

CancelJobsThread::CancelJobsThread ( std::list< css::uno::Reference< css::util::XCancellable > > &&  rJobs)
inlineexplicit

Definition at line 42 of file finalthreadmanager.cxx.

Member Function Documentation

◆ addJobs()

void CancelJobsThread::addJobs ( std::list< css::uno::Reference< css::util::XCancellable > > &  rJobs)

Definition at line 68 of file finalthreadmanager.cxx.

References maJobs, maMutex, and mbAllJobsCancelled.

◆ allJobsCancelled()

bool CancelJobsThread::allJobsCancelled ( ) const

Definition at line 83 of file finalthreadmanager.cxx.

References maJobs, maMutex, and mbAllJobsCancelled.

Referenced by TerminateOfficeThread::run().

◆ existJobs()

bool CancelJobsThread::existJobs ( ) const
private

Definition at line 76 of file finalthreadmanager.cxx.

References maJobs, and maMutex.

Referenced by run().

◆ getNextJob()

css::uno::Reference< css::util::XCancellable > CancelJobsThread::getNextJob ( )
private

Definition at line 97 of file finalthreadmanager.cxx.

References maJobs, and maMutex.

Referenced by run().

◆ run()

void SAL_CALL CancelJobsThread::run ( )
overrideprivatevirtual

Definition at line 121 of file finalthreadmanager.cxx.

References existJobs(), getNextJob(), mbAllJobsCancelled, and stopped().

◆ stopped()

bool CancelJobsThread::stopped ( ) const
private

Definition at line 114 of file finalthreadmanager.cxx.

References maMutex, and mbStopped.

Referenced by run().

◆ stopWhenAllJobsCancelled()

void CancelJobsThread::stopWhenAllJobsCancelled ( )

Definition at line 90 of file finalthreadmanager.cxx.

References maMutex, and mbStopped.

Member Data Documentation

◆ maJobs

std::list< css::uno::Reference< css::util::XCancellable > > CancelJobsThread::maJobs
private

Definition at line 62 of file finalthreadmanager.cxx.

Referenced by addJobs(), allJobsCancelled(), existJobs(), and getNextJob().

◆ maMutex

std::mutex CancelJobsThread::maMutex
mutableprivate

◆ mbAllJobsCancelled

bool CancelJobsThread::mbAllJobsCancelled
private

Definition at line 64 of file finalthreadmanager.cxx.

Referenced by addJobs(), allJobsCancelled(), and run().

◆ mbStopped

bool CancelJobsThread::mbStopped
private

Definition at line 65 of file finalthreadmanager.cxx.

Referenced by stopped(), and stopWhenAllJobsCancelled().


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