diff options
author | Toni Uhlig <Toni.Uhlig@tq-group.com> | 2017-12-04 11:05:50 +0100 |
---|---|---|
committer | Toni Uhlig <Toni.Uhlig@tq-group.com> | 2017-12-04 11:05:50 +0100 |
commit | 712457fab6a7caad1ab245460c0170026ab91b10 (patch) | |
tree | 87737f06ea5df06a538f212b28ca647beabdde64 /src/JobQueue.cpp | |
parent | 4eb5a237a33be363e8adf02f63651fc4b1dd8a4b (diff) |
JobQ: added BusyWorker counter and TotalJobsDone counter
Diffstat (limited to 'src/JobQueue.cpp')
-rw-r--r-- | src/JobQueue.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/JobQueue.cpp b/src/JobQueue.cpp index af9a7e1..eb6320c 100644 --- a/src/JobQueue.cpp +++ b/src/JobQueue.cpp @@ -45,11 +45,17 @@ void WorkerThread::doJob() UpdateFactory uf; Job job = m_pQueue->Pop(); + m_pQueue->incBusyWorker(); + + /* process the job which was started by the GUI */ switch(job.m_cmd) { case Job::eID_THREAD_EXIT: + m_pQueue->decBusyWorker(); throw Job::eID_THREAD_EXIT; case Job::eID_THREAD_JOB: + Sleep(1000); /* give the UI some time to handle a lot of new Jobs */ + m_pQueue->Report(Job::eID_THREAD_MSG, wxString::Format(wxT("Job #%d: Connecting to %s:%i"), job.m_Arg.jobid, job.m_Arg.hostname, job.m_Arg.port), m_ID); @@ -122,4 +128,5 @@ void WorkerThread::doJob() default: break; } + m_pQueue->decBusyWorker(); } |