package org.jeecg.modules.dynamicStaticAnalysis.algorithm;

import lombok.extern.slf4j.Slf4j;

/**
 * 多生产者模型-单消费者模型
 * 单消费者
 */
@Slf4j
public class SingleConsumer {

    public static void consume() {
        try {
            while (true) {
                String analysisBatchId = Buffer.queue.take();
                log.info("SingleConsumer[消费者]|线程id:【" + Thread.currentThread().getId() + "】=============分析批次ID:【" + analysisBatchId+"】");
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
