123456789101112131415161718192021222324252627282930 |
- #include "TickWorker.h"
- #include "Block.h"
- TickWorker::TickWorker(TickQueue* queue)
- : Thread(),
- queue(queue),
- waiting(0)
- {
- start();
- }
- TickWorker::~TickWorker()
- {}
- void TickWorker::thread()
- {
- Tickable* zTick = queue->zNext(waiting);
- while (zTick)
- {
- zTick->tick(queue);
- zTick = queue->zNext(waiting);
- }
- std::cout << "exiting tick worker " << GetThreadId(this->getThreadHandle());
- }
- bool TickWorker::isWaiting() const
- {
- return waiting;
- }
|