夏C++QT5跨平臺(tái)界面編程原理和實(shí)戰(zhàn)大全視頻
static class Producer extends Thread {
? ? ? ?private final Queue<Integer> queue;
? ? ? ?private final Lock lock;
? ? ? ?private final Condition queueEmpty;
? ? ? ?private final Condition queueFull;
? ? ? ?public Producer(Queue<Integer> queue, Lock lock, Condition queueEmpty, Condition queueFull) {
? ? ? ? ? ?this.queue = queue;
? ? ? ? ? ?this.lock = lock;
? ? ? ? ? ?this.queueEmpty = queueEmpty;
? ? ? ? ? ?this.queueFull = queueFull;
? ? ? ?}
? ? ? ?@Override
標(biāo)簽: