![]() |
Mixxx
|
00001 #include "engine/syncworker.h" 00002 00003 #include "controlobject.h" 00004 #include "engine/engineworkerscheduler.h" 00005 00006 SyncWorker::SyncWorker(EngineWorkerScheduler* pScheduler) { 00007 pScheduler->bindWorker(this); 00008 } 00009 00010 SyncWorker::~SyncWorker() { 00011 } 00012 00013 void SyncWorker::run() { 00014 // Notify the EngineWorkerScheduler that the work we scheduled is starting. 00015 emit(workStarting(this)); 00016 00017 ControlObject::sync(); 00018 00019 // Notify the EngineWorkerScheduler that the work we did is done. 00020 emit(workDone(this)); 00021 } 00022 00023 void SyncWorker::schedule() { 00024 emit(workReady(this)); 00025 }