firemail

标题: QWaitCondition [打印本页]

作者: Qter    时间: 2021-12-10 13:56
标题: QWaitCondition

class BASE_API ProduceQueue
{
    friend class Producer;
    friend class Consumer;

public:
        ProduceQueue();
        ~ProduceQueue();

        // 返回所有等待处理的Id
        QList<int> getBufferList();

protected:
    QQueue<int>     buffer;
    QMutex          mutex;
    QWaitCondition bufferIsNotFull;
    QWaitCondition bufferIsNotEmpty;
    const int      MAX;
};






欢迎光临 firemail (http://firemail.wang:8088/) Powered by Discuz! X3