#pragma once #include #include #include class Block; class TickQueue : public virtual Framework::ReferenceCounter { private: int maxSize; int readPosition; int writePosition; Block** queue; std::mutex mutex; std::condition_variable hasBlocks; std::condition_variable hasNoBlocks; bool exit; public: TickQueue(); ~TickQueue(); void startNextTick( Framework::Array* zSources ); void addToQueue( Block* zBlock ); Block* zNextBlock( bool& waiting ); void requestExit(); void waitForEmpty(); };