Skip to content

Commit

Permalink
CJobQueue: add IsProcessing()
Browse files Browse the repository at this point in the history
  • Loading branch information
Montellese authored and popcornmix committed Feb 18, 2015
1 parent 4d1f3c0 commit c9efe23
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/utils/JobManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ void CJobQueue::CancelJobs()
m_processing.clear();
}

bool CJobQueue::IsProcessing() const
{
return !m_processing.empty() || !m_jobQueue.empty();
}

bool CJobQueue::QueueEmpty() const
{
Expand Down
5 changes: 5 additions & 0 deletions xbmc/utils/JobManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ class CJobQueue: public IJobCallback
*/
void CancelJobs();

/*!
\brief Check whether the queue is processing a job
*/
bool IsProcessing() const;

/*!
\brief The callback used when a job completes.
Expand Down

0 comments on commit c9efe23

Please sign in to comment.