#ifndef _PIPELINEPOOL_H_ #define _PIPELINEPOOL_H_ #include "PipeLine.h" #include class PipeLinePool { public: PipeLinePool(bool _multithread_safe = false); ~PipeLinePool(); void manage(PipeLine* pl); void unmanage(PipeLine* pl); PipeLine* get_free(); void release(PipeLine* pl); bool wait_free(); bool notify_free(); private: bool multithread_safe; void* tsafe_mutex; void* pl_mutex; typedef std::set pl_set_t; pl_set_t pipelines; pl_set_t pipelines_free; }; #endif