Debugger: Add worker helper function.

Worker:
- Add helper to check if the background worker thread has any unfinished
  jobs in its queue.
This commit is contained in:
Rene Gollent 2015-08-14 20:39:00 -04:00
parent b73c4b60f3
commit 667361d71f
2 changed files with 10 additions and 0 deletions

View File

@ -342,6 +342,14 @@ Worker::ResumeJob(Job* job)
}
bool
Worker::HasPendingJobs()
{
AutoLocker<Worker> locker(this);
return !fJobs.IsEmpty();
}
status_t
Worker::AddListener(const JobKey& key, JobListener* listener)
{

View File

@ -149,6 +149,8 @@ public:
// only valid for jobs that are
// suspended pending user input
bool HasPendingJobs();
status_t AddListener(const JobKey& key,
JobListener* listener);
void RemoveListener(const JobKey& key,