12345678910111213141516171819202122232425262728293031 |
- #include "TickWorker.h"
- #include "Block.h"
- TickWorker::TickWorker( TickQueue* queue )
- : Thread(),
- queue( queue ),
- waiting( 0 )
- {
- start();
- }
- TickWorker::~TickWorker()
- {
- queue->release();
- }
- void TickWorker::thread()
- {
- Block* zTickBlock = queue->zNextBlock( waiting );
- while( zTickBlock )
- {
- zTickBlock->tick( queue );
- zTickBlock = queue->zNextBlock( waiting );
- }
- }
- bool TickWorker::isWaiting() const
- {
- return waiting;
- }
|